Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion administrator/modules/mod_feed/src/Helper/FeedHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getFeedData(Registry $params, FeedFactory $feed): \Joomla\CMS\Fe
// Get RSS parsed object
try {
$rssDoc = $feed->getFeed($rssurl);
} catch (\Exception $e) {
} catch (\Exception) {
return Text::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function getData()

try {
return $db->loadObjectList();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
return [];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function getStatsData(Registry $params, CMSApplication $app, DatabaseInte

try {
$items = $db->loadResult();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$items = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getArticlesByMonths(Registry $moduleParams, SiteApplication $app

try {
$rows = (array) $db->loadObjectList();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');

return [];
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_feed/src/Helper/FeedHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getFeedInformation($params)
try {
$feed = new FeedFactory();
$rssDoc = $feed->getFeed($rssurl);
} catch (\Exception $e) {
} catch (\Exception) {
return Text::_('MOD_FEED_ERR_FEED_NOT_RETRIEVED');
}

Expand Down
4 changes: 2 additions & 2 deletions modules/mod_related_items/src/Helper/RelatedItemsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getRelatedArticles(Registry $params, SiteApplication $app): arra

try {
$metakey = trim($db->loadResult());
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');

return [];
Expand Down Expand Up @@ -150,7 +150,7 @@ public function getRelatedArticles(Registry $params, SiteApplication $app): arra

try {
$articleIds = $db->loadColumn();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');

return [];
Expand Down
4 changes: 2 additions & 2 deletions modules/mod_stats/src/Helper/StatsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function getStats(Registry &$params, CMSApplicationInterface $app)

try {
$items = $db->loadResult();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$items = false;
}

Expand Down Expand Up @@ -134,7 +134,7 @@ public function getStats(Registry &$params, CMSApplicationInterface $app)

try {
$hits = $db->loadResult();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$hits = false;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/mod_tags_similar/src/Helper/TagsSimilarHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function getItems(&$params)

try {
$results = $db->loadObjectList();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$results = [];
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_users_latest/src/Helper/UsersLatestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getLatestUsers(Registry $params, SiteApplication $app): array

try {
return (array) $db->loadObjectList();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');

return [];
Expand Down
4 changes: 2 additions & 2 deletions modules/mod_whosonline/src/Helper/WhosonlineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static function getOnlineCount()

try {
$sessions = (array) $db->loadObjectList();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$sessions = [];
}

Expand Down Expand Up @@ -113,7 +113,7 @@ public static function getOnlineUserNames($params)

try {
return (array) $db->loadObjectList();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
return [];
}
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/actionlog/joomla/src/Extension/Joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public function onContentChangeState(Model\AfterChangeStateEvent $event): void

try {
$items = $db->loadObjectList($params->id_holder);
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$items = [];
}

Expand Down Expand Up @@ -875,7 +875,7 @@ public function onUserLoginFailure(User\LoginFailureEvent $event): void

try {
$loggedInUser = $db->loadObject();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
return;
}

Expand Down
6 changes: 3 additions & 3 deletions plugins/api-authentication/token/src/Extension/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function onUserAuthenticate(AuthenticationEvent $event): void
*/
try {
$siteSecret = $this->getApplication()->get('secret');
} catch (\Exception $e) {
} catch (\Exception) {
return;
}

Expand Down Expand Up @@ -282,7 +282,7 @@ private function getTokenSeedForUser(int $userId): ?string
$query->bind(':userId', $userId, ParameterType::INTEGER);

return $db->setQuery($query)->loadResult();
} catch (\Exception $e) {
} catch (\Exception) {
return null;
}
}
Expand Down Expand Up @@ -313,7 +313,7 @@ private function isTokenEnabledForUser(int $userId): bool
$value = $db->setQuery($query)->loadResult();

return $value == 1;
} catch (\Exception $e) {
} catch (\Exception) {
return false;
}
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/authentication/cookie/src/Extension/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function onUserAuthenticate(AuthenticationEvent $event): void

try {
$result = $db->setQuery($query)->loadObject();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$response->status = Authentication::STATUS_FAILURE;

return;
Expand Down Expand Up @@ -303,7 +303,7 @@ public function onUserAfterLogin(AfterLoginEvent $event): void
if ($results === null) {
$unique = true;
}
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$errorCount++;

// We'll let this query fail up to 5 times before giving up, there's probably a bigger issue at this point
Expand Down Expand Up @@ -370,7 +370,7 @@ public function onUserAfterLogin(AfterLoginEvent $event): void

try {
$db->setQuery($query)->execute();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
// We aren't concerned with errors from this query, carry on
}
}
Expand Down Expand Up @@ -416,7 +416,7 @@ public function onUserAfterLogout(AfterLogoutEvent $event): void

try {
$db->setQuery($query)->execute();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
// We aren't concerned with errors from this query, carry on
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private function getAssignedArticleUrl()

try {
$article = $db->loadObject();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
// Something at the database layer went wrong
return Route::_(
'index.php?option=com_content&view=article&id='
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getActiveSiteTemplate()

try {
return $db->loadObject();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$this->getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');

return new \stdClass();
Expand Down
2 changes: 1 addition & 1 deletion plugins/extension/finder/src/Extension/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function ($word) {
try {
$db->setQuery($query);
$db->execute();
} catch (\Exception $ex) {
} catch (\Exception) {
// It would be nice if the common word is stored to the DB, but it isn't super important
}
}
Expand Down
18 changes: 9 additions & 9 deletions plugins/filesystem/local/src/Adapter/LocalAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function createFile(string $name, string $path, $data): string

try {
File::write($localPath, $data);
} catch (FilesystemException $exception) {
} catch (FilesystemException) {
}

if ($this->thumbnails && MediaHelper::isImage(pathinfo($localPath)['basename'])) {
Expand Down Expand Up @@ -303,7 +303,7 @@ public function updateFile(string $name, string $path, $data)

try {
File::write($localPath, $data);
} catch (FilesystemException $exception) {
} catch (FilesystemException) {
}

if ($this->thumbnails && MediaHelper::isImage(pathinfo($localPath)['basename'])) {
Expand Down Expand Up @@ -426,7 +426,7 @@ private function getPathInformation(string $path): \stdClass
$obj->height = $props->height;

$obj->thumb_path = $this->thumbnails ? $this->getThumbnail($path) : $this->getUrl($obj->path);
} catch (UnparsableImageException $e) {
} catch (UnparsableImageException) {
// Ignore the exception - it's an image that we don't know how to parse right now
}
}
Expand Down Expand Up @@ -537,7 +537,7 @@ private function copyFile(string $sourcePath, string $destinationPath, bool $for

try {
File::copy($sourcePath, $destinationPath);
} catch (FilesystemException $exception) {
} catch (FilesystemException) {
throw new \Exception(Text::_('COM_MEDIA_COPY_FILE_NOT_POSSIBLE'));
}
}
Expand All @@ -564,7 +564,7 @@ private function copyFolder(string $sourcePath, string $destinationPath, bool $f
if (is_file($destinationPath)) {
File::delete($destinationPath);
}
} catch (FilesystemException $exception) {
} catch (FilesystemException) {
throw new \Exception(Text::_('COM_MEDIA_COPY_FOLDER_DESTINATION_CAN_NOT_DELETE'));
}

Expand Down Expand Up @@ -652,7 +652,7 @@ private function moveFile(string $sourcePath, string $destinationPath, bool $for

try {
File::move($sourcePath, $destinationPath);
} catch (FilesystemException $exception) {
} catch (FilesystemException) {
throw new \Exception(Text::_('COM_MEDIA_MOVE_FILE_NOT_POSSIBLE'));
}
}
Expand All @@ -679,7 +679,7 @@ private function moveFolder(string $sourcePath, string $destinationPath, bool $f
if (is_file($destinationPath)) {
File::delete($destinationPath);
}
} catch (FilesystemException $exception) {
} catch (FilesystemException) {
throw new \Exception(Text::_('COM_MEDIA_MOVE_FOLDER_NOT_POSSIBLE'));
}

Expand Down Expand Up @@ -860,7 +860,7 @@ private function checkContent(string $localPath, string $mediaContent)

try {
File::delete($tmpFile);
} catch (FilesystemException $exception) {
} catch (FilesystemException) {
}

if (!$can) {
Expand Down Expand Up @@ -986,7 +986,7 @@ private function createThumbnail(string $path, string $thumbnailPath): bool
{
try {
(new Image($path))->createThumbnails([$this->thumbnailSize[0] . 'x' . $this->thumbnailSize[1]], Image::SCALE_INSIDE, \dirname($thumbnailPath), true);
} catch (\Exception $e) {
} catch (\Exception) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/installer/override/src/Extension/Override.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function getOverrideCoreList()
try {
/** @var \Joomla\Component\Templates\Administrator\Model\TemplateModel $templateModel */
$templateModel = $this->getModel();
} catch (\Exception $e) {
} catch (\Exception) {
return [];
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/multifactorauth/email/src/Extension/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function onUserMultifactorCaptive(Captive $event): void

try {
$this->sendCode($key, $user);
} catch (\Exception $e) {
} catch (\Exception) {
return;
}

Expand Down Expand Up @@ -476,7 +476,7 @@ function (MfaTable $record) {
'user_id' => $user->id,
]
);
} catch (\Exception $event) {
} catch (\Exception) {
// Fail gracefully
}
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/multifactorauth/webauthn/src/Extension/Webauthn.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function onUserMultifactorCaptive(Captive $event): void
ob_start();
include $layoutPath;
$html = ob_get_clean();
} catch (\Exception $e) {
} catch (\Exception) {
return;
}

Expand Down Expand Up @@ -422,7 +422,7 @@ public function onUserMultifactorValidate(Validate $event): void
} catch (\Exception $e) {
try {
$this->getApplication()->enqueueMessage($e->getMessage(), 'error');
} catch (\Exception $e) {
} catch (\Exception) {
}

$event->addResult(false);
Expand Down
4 changes: 2 additions & 2 deletions plugins/multifactorauth/webauthn/src/Helper/Credentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function verifyAttestation(string $data): ?PublicKeyCredentialSour

try {
$publicKeyCredentialCreationOptions = unserialize(base64_decode($encodedOptions));
} catch (\Exception $e) {
} catch (\Exception) {
$publicKeyCredentialCreationOptions = null;
}

Expand Down Expand Up @@ -274,7 +274,7 @@ private static function getWebauthnServer(?int $userId): Server
try {
$app = Factory::getApplication();
$siteName = $app->get('sitename');
} catch (\Exception $e) {
} catch (\Exception) {
$siteName = 'Joomla! Site';
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function ($rec) use ($record) {
return $rec->method === $record->method;
}
);
} catch (\Exception $e) {
} catch (\Exception) {
$records = [];
}

Expand Down Expand Up @@ -409,7 +409,7 @@ private function validateYubikeyOtp(string $otp): bool
} else {
continue;
}
} catch (\Exception $exc) {
} catch (\Exception) {
// No response, continue with the next server
continue;
}
Expand Down
Loading