Skip to content

Commit

Permalink
Merge pull request #45035 from richard67/5.4-dev-upmerge-2025-02-28
Browse files Browse the repository at this point in the history
[5.4] Upmerge changes from 5.3-dev 2025-02-28
richard67 authored Feb 28, 2025

Verified

This commit was signed with the committer’s verified signature.
dgrammatiko Dimitris Grammatikogiannis
2 parents 377000b + f61dca9 commit 362ec5e
Showing 219 changed files with 523 additions and 465 deletions.
6 changes: 6 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -91,6 +91,12 @@
'native_function_invocation' => ['include' => ['@compiler_optimized']],
// Adds null to type declarations when parameter have a default null value
'nullable_type_declaration_for_default_null_value' => true,
// Removes unneeded parentheses around control statements
'no_unneeded_control_parentheses' => true,
// Using isset($var) && multiple times should be done in one call.
'combine_consecutive_issets' => true,
// Calling unset on multiple items should be done in one call
'combine_consecutive_unsets' => true,
]
)
->setFinder($finder);
Original file line number Diff line number Diff line change
@@ -193,7 +193,7 @@ private static function getExtensionHelperClassName($extensionName)
*/
private static function getExtensionRealName($extensionName)
{
return !str_contains($extensionName, 'com_') ? $extensionName : substr($extensionName, 4);
return !str_starts_with($extensionName, 'com_') ? $extensionName : substr($extensionName, 4);
}

/**
@@ -593,7 +593,7 @@ public static function canCheckinItem($extensionName, $typeName, $itemId)

$userId = Factory::getUser()->id;

return ($item->{$checkedOutFieldName} == $userId || $item->{$checkedOutFieldName} == 0);
return $item->{$checkedOutFieldName} == $userId || $item->{$checkedOutFieldName} == 0;
}

/**
Original file line number Diff line number Diff line change
@@ -174,8 +174,7 @@ public function display($tpl = null)

// Dynamic filter form.
// This selectors doesn't have to activate the filter bar.
unset($this->activeFilters['itemtype']);
unset($this->activeFilters['language']);
unset($this->activeFilters['itemtype'], $this->activeFilters['language']);

// Remove filters options depending on selected type.
if (empty($support['state'])) {
@@ -249,7 +248,7 @@ protected function addToolbar()
{
$user = $this->getCurrentUser();

if (isset($this->typeName) && isset($this->extensionName)) {
if (isset($this->typeName, $this->extensionName)) {
$helper = AssociationsHelper::getExtensionHelper($this->extensionName);
$title = $helper->getTypeTitle($this->typeName);

Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ public function __construct(DatabaseDriver $db, ?DispatcherInterface $dispatcher

$this->created = Factory::getDate()->toSql();
$this->setColumnAlias('published', 'state');
$this->setColumnAlias('title', 'name');
}

/**
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ protected function allowAdd($data = [])
{
$user = $this->app->getIdentity();

return ($user->authorise('core.create', $this->extension) || \count($user->getAuthorisedCategories($this->extension, 'core.create')));
return $user->authorise('core.create', $this->extension) || \count($user->getAuthorisedCategories($this->extension, 'core.create'));
}

/**
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ public function checkin($ids = [])

$fields = $db->getTableColumns($tn, false);

if (!(isset($fields['checked_out']) && isset($fields['checked_out_time']))) {
if (!(isset($fields['checked_out'], $fields['checked_out_time']))) {
continue;
}

@@ -183,7 +183,7 @@ public function getItems()

$fields = $db->getTableColumns($tn, false);

if (!(isset($fields['checked_out']) && isset($fields['checked_out_time']))) {
if (!(isset($fields['checked_out'], $fields['checked_out_time']))) {
continue;
}

Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ public function save($key = null, $urlVar = null)
}

// Remove the permissions rules data if user isn't allowed to edit them.
if (!$user->authorise('core.admin', $option) && isset($data['params']) && isset($data['params']['rules'])) {
if (!$user->authorise('core.admin', $option) && isset($data['params']['rules'])) {
unset($data['params']['rules']);
}

Original file line number Diff line number Diff line change
@@ -201,8 +201,7 @@ public function save($data)
}

// We don't need this anymore
unset($data['option']);
unset($data['params']['rules']);
unset($data['option'], $data['params']['rules']);
}

// Load the previous Data
Original file line number Diff line number Diff line change
@@ -142,7 +142,7 @@ public function getContexts(): array
*/
protected function getTableNameForSection(?string $section = null)
{
return ($section === 'category' ? 'categories' : 'contact_details');
return $section === 'category' ? 'categories' : 'contact_details';
}

/**
Original file line number Diff line number Diff line change
@@ -649,7 +649,7 @@ public function save($data)
$input = $app->getInput();
$filter = InputFilter::getInstance();

if (isset($data['metadata']) && isset($data['metadata']['author'])) {
if (isset($data['metadata']['author'])) {
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
}

Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ public static function getLookupValue($lookup, $value)
{
$result = false;

if (isset($lookup->sourceColumn) && isset($lookup->targetTable) && isset($lookup->targetColumn) && isset($lookup->displayColumn)) {
if (isset($lookup->sourceColumn, $lookup->targetTable, $lookup->targetColumn, $lookup->displayColumn)) {
$db = Factory::getDbo();
$value = (int) $value;
$query = $db->getQuery(true);
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ public function display($tpl = null)
$parts = explode('.', $dashboard);
$component = $parts[0];

if (!str_contains($component, 'com_')) {
if (!str_starts_with($component, 'com_')) {
$component = 'com_' . $component;
}

23 changes: 22 additions & 1 deletion administrator/components/com_fields/src/Model/FieldModel.php
Original file line number Diff line number Diff line change
@@ -229,7 +229,7 @@ public function save($data)
*/
if (
$field && \in_array($field->type, ['list', 'checkboxes', 'radio'], true)
&& isset($data['fieldparams']['options']) && isset($field->fieldparams['options'])
&& isset($data['fieldparams']['options'], $field->fieldparams['options'])
) {
$oldParams = $this->getParams($field->fieldparams['options']);
$newParams = $this->getParams($data['fieldparams']['options']);
@@ -1168,6 +1168,16 @@ protected function batchCopy($value, $pks, $contexts)

foreach ($pks as $pk) {
if ($user->authorise('core.create', $component . '.fieldgroup.' . $value)) {
// Find all assigned categories to this field
$db = $this->getDatabase();
$query = $db->getQuery(true);

$query->select($db->quoteName('category_id'))
->from($db->quoteName('#__fields_categories'))
->where($db->quoteName('field_id') . ' = ' . (int) $pk);

$assignedCatIds = $db->setQuery($query)->loadColumn();

$table->reset();
$table->load($pk);

@@ -1194,6 +1204,17 @@ protected function batchCopy($value, $pks, $contexts)
// Get the new item ID
$newId = $table->id;

// Inset the assigned categories
if (!empty($assignedCatIds)) {
$tuple = new \stdClass();
$tuple->field_id = $newId;

foreach ($assignedCatIds as $catId) {
$tuple->category_id = $catId;
$db->insertObject('#__fields_categories', $tuple);
}
}

// Add the new ID to the array
$newIds[$pk] = $newId;
} else {
19 changes: 11 additions & 8 deletions administrator/components/com_fields/src/Model/GroupModel.php
Original file line number Diff line number Diff line change
@@ -120,14 +120,13 @@ public function getForm($data = [], $loadData = true)
return false;
}

// Modify the form based on Edit State access controls.
if (empty($data['context'])) {
$data['context'] = $context;
}
$record = new \stdClass();
$record->context = $context;
$record->id = $jinput->get('id');

$user = $this->getCurrentUser();

if (!$user->authorise('core.edit.state', $context . '.fieldgroup.' . $jinput->get('id'))) {
if (!$this->canEditState($record)) {
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('state', 'disabled', 'true');
@@ -160,7 +159,9 @@ protected function canDelete($record)
return false;
}

return $this->getCurrentUser()->authorise('core.delete', $record->context . '.fieldgroup.' . (int) $record->id);
$component = explode('.', $record->context)[0];

return $this->getCurrentUser()->authorise('core.delete', $component . '.fieldgroup.' . (int) $record->id);
}

/**
@@ -177,13 +178,15 @@ protected function canEditState($record)
{
$user = $this->getCurrentUser();

$component = explode('.', $record->context)[0];

// Check for existing fieldgroup.
if (!empty($record->id)) {
return $user->authorise('core.edit.state', $record->context . '.fieldgroup.' . (int) $record->id);
return $user->authorise('core.edit.state', $component . '.fieldgroup.' . (int) $record->id);
}

// Default to component settings.
return $user->authorise('core.edit.state', $record->context);
return $user->authorise('core.edit.state', $component);
}

/**
Original file line number Diff line number Diff line change
@@ -173,7 +173,7 @@ public function loadChangelog()

$output = $model->loadChangelog($eid, $source);

echo (new JsonResponse($output));
echo new JsonResponse($output);
}

/**
2 changes: 1 addition & 1 deletion administrator/components/com_joomlaupdate/extract.php
Original file line number Diff line number Diff line change
@@ -1956,7 +1956,7 @@ function setHugeMemoryLimit()
@unlink($basePath . 'update.php');

// Import a custom finalisation file
$filename = \dirname(__FILE__) . '/finalisation.php';
$filename = __DIR__ . '/finalisation.php';

if (file_exists($filename)) {
clearFileInOPCache($filename);
Original file line number Diff line number Diff line change
@@ -1415,9 +1415,7 @@ public function getNonCoreExtensions()
$decode = json_decode($extension->manifest_cache);

// Remove unused fields so they do not cause javascript errors during pre-update check
unset($decode->description);
unset($decode->copyright);
unset($decode->creationDate);
unset($decode->description, $decode->copyright, $decode->creationDate);

$this->translateExtensionName($extension);
$extension->version
@@ -1476,9 +1474,7 @@ public function getNonCorePlugins($folderFilter = ['system', 'user', 'authentica
$decode = json_decode($plugin->manifest_cache);

// Remove unused fields so they do not cause javascript errors during pre-update check
unset($decode->description);
unset($decode->copyright);
unset($decode->creationDate);
unset($decode->description, $decode->copyright, $decode->creationDate);

$this->translateExtensionName($plugin);
$plugin->version = $decode->version ?? Text::_('COM_JOOMLAUPDATE_PREUPDATE_UNKNOWN_EXTENSION_MANIFESTCACHE_VERSION');
6 changes: 3 additions & 3 deletions administrator/components/com_mails/src/Helper/MailsHelper.php
Original file line number Diff line number Diff line change
@@ -75,16 +75,16 @@ public static function loadTranslationFiles($extension, $language = 'en-GB')
return;
}

$lang = Factory::getLanguage();
$lang = Factory::getApplication()->getLanguage();
$source = '';

switch (substr($extension, 0, 3)) {
case 'com':
default:
$source = JPATH_ADMINISTRATOR . '/components/' . $extension;

$lang->load($extension, JPATH_BASE, $language, true)
|| $lang->load($extension, JPATH_BASE . '/components/' . $extension, $language, true);
$lang->load($extension, JPATH_SITE, $language, true)
|| $lang->load($extension, JPATH_SITE . '/components/' . $extension, $language, true);

break;

2 changes: 1 addition & 1 deletion administrator/components/com_menus/src/Model/ItemModel.php
Original file line number Diff line number Diff line change
@@ -567,7 +567,7 @@ protected function loadFormData()

// Only merge if there is a session and itemId or itemid is null.
if (
isset($sessionData['id']) && isset($itemData['id']) && $sessionData['id'] === $itemData['id']
isset($sessionData['id'], $itemData['id']) && $sessionData['id'] === $itemData['id']
|| \is_null($itemData['id'])
) {
$data = array_merge($itemData, $sessionData);
Original file line number Diff line number Diff line change
@@ -537,8 +537,7 @@ protected function getTypeOptionsFromLayouts($component, $view)

// If the view is hidden from the menu, discard it and move on to the next view.
if (!empty($menu['hidden']) && $menu['hidden'] == 'true') {
unset($xml);
unset($o);
unset($xml, $o);
continue;
}

Original file line number Diff line number Diff line change
@@ -156,8 +156,7 @@ public function display($tpl = null)

// If in the frontend state and language should not activate the search tools.
if (Factory::getApplication()->isClient('site')) {
unset($this->activeFilters['state']);
unset($this->activeFilters['language']);
unset($this->activeFilters['state'], $this->activeFilters['language']);
}
}

Original file line number Diff line number Diff line change
@@ -32,9 +32,9 @@ class PostinstallHelper
*/
public function parsePath($path)
{
if (str_contains($path, 'site://')) {
if (str_starts_with($path, 'site://')) {
$path = JPATH_ROOT . str_replace('site://', '/', $path);
} elseif (str_contains($path, 'admin://')) {
} elseif (str_starts_with($path, 'admin://')) {
$path = JPATH_ADMINISTRATOR . str_replace('admin://', '/', $path);
}

18 changes: 10 additions & 8 deletions administrator/components/com_templates/src/Model/TemplateModel.php
Original file line number Diff line number Diff line change
@@ -701,7 +701,7 @@ public function checkNewName()
->bind(':name', $name);
$db->setQuery($query);

return ($db->loadResult() == 0);
return $db->loadResult() == 0;
}

/**
@@ -2002,15 +2002,17 @@ public function child()
}

$user = $this->getCurrentUser();
unset($xml->languages);
unset($xml->media);
unset($xml->files);
unset($xml->parent);
unset($xml->inheritable);

// Remove the update parts
unset($xml->update);
unset($xml->updateservers);
unset(
$xml->languages,
$xml->media,
$xml->files,
$xml->parent,
$xml->inheritable,
$xml->update,
$xml->updateservers
);

if (isset($xml->creationDate)) {
$xml->creationDate = (new Date('now'))->format('F Y');
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ class GroupController extends FormController
*/
protected function allowSave($data, $key = 'id')
{
return ($this->app->getIdentity()->authorise('core.admin', $this->option) && parent::allowSave($data, $key));
return $this->app->getIdentity()->authorise('core.admin', $this->option) && parent::allowSave($data, $key);
}

/**
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ class LevelController extends FormController
*/
protected function allowSave($data, $key = 'id')
{
return ($this->app->getIdentity()->authorise('core.admin', $this->option) && parent::allowSave($data, $key));
return $this->app->getIdentity()->authorise('core.admin', $this->option) && parent::allowSave($data, $key);
}

/**
2 changes: 1 addition & 1 deletion administrator/index.php
Original file line number Diff line number Diff line change
@@ -29,4 +29,4 @@
\define('_JEXEC', 1);

// Run the application - All executable code should be triggered through this file
require_once \dirname(__FILE__) . '/includes/app.php';
require_once __DIR__ . '/includes/app.php';
2 changes: 1 addition & 1 deletion administrator/modules/mod_feed/src/Helper/FeedHelper.php
Original file line number Diff line number Diff line change
@@ -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');
}

10 changes: 5 additions & 5 deletions administrator/modules/mod_menu/src/Menu/CssMenu.php
Original file line number Diff line number Diff line change
@@ -236,7 +236,7 @@ protected function check($node, Registry $params)

$table->load(['menutype' => $menutype]);

$menutype = isset($table->title) ? $table->title : $menutype;
$menutype = $table->title ?? $menutype;
$message = Text::sprintf('MOD_MENU_IMPORTANT_ITEMS_INACCESSIBLE_LIST_WARNING', $menutype, implode(', ', $missing), $uri);

$this->application->enqueueMessage($message, 'warning');
@@ -284,8 +284,8 @@ protected function preprocess($parent)
continue;
}

$item->scope = $item->scope ?? 'default';
$item->icon = $item->icon ?? '';
$item->scope ??= 'default';
$item->icon ??= '';

// Whether this scope can be displayed. Applies only to preset items. Db driven items should use un/published state.
if (($item->scope === 'help' && $this->params->get('showhelp', 1) == 0) || ($item->scope === 'edit' && !$this->params->get('shownew', 1))) {
@@ -353,7 +353,7 @@ protected function preprocess($parent)
continue;
}

list($assetName) = isset($query['context']) ? explode('.', $query['context'], 2) : ['com_fields'];
[$assetName] = isset($query['context']) ? explode('.', $query['context'], 2) : ['com_fields'];
} elseif ($item->element === 'com_cpanel' && $item->link === 'index.php') {
continue;
} elseif (
@@ -382,7 +382,7 @@ protected function preprocess($parent)
continue;
}

list($assetName) = isset($query['extension']) ? explode('.', $query['extension'], 2) : ['com_workflow'];
[$assetName] = isset($query['extension']) ? explode('.', $query['extension'], 2) : ['com_workflow'];
} elseif (\in_array($item->element, ['com_config', 'com_privacy', 'com_actionlogs'], true) && !$user->authorise('core.admin')) {
// Special case for components which only allow super user access
$parent->removeChild($item);
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ public static function getData()

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

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

@@ -131,7 +131,7 @@ public function getStatsData(Registry $params, CMSApplication $app, DatabaseInte
foreach ($arrays as $response) {
foreach ($response as $row) {
// We only add a row if the title and data are given
if (isset($row['title']) && isset($row['data'])) {
if (isset($row['title'], $row['data'])) {
$rows[$i] = new \stdClass();
$rows[$i]->title = $row['title'];
$rows[$i]->icon = $row['icon'] ?? 'info';
Original file line number Diff line number Diff line change
@@ -97,8 +97,7 @@ protected function prepareItem($item)
{
$item->id = $item->key;
$item->value = $item->override;
unset($item->key);
unset($item->override);
unset($item->key, $item->override);

return parent::prepareItem($item);
}
Original file line number Diff line number Diff line change
@@ -212,7 +212,7 @@ public function add(): void
}

// Content is only required when it is a file
if (empty($content) && strpos($path, '.') !== false) {
if (empty($content) && str_contains($path, '.')) {
$missingParameters[] = 'content';
}

2 changes: 1 addition & 1 deletion api/components/com_media/src/Model/AdapterModel.php
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ class AdapterModel extends BaseModel
*/
public function getItem(): \stdClass
{
list($provider, $account) = array_pad(explode('-', $this->getState('id'), 2), 2, null);
[$provider, $account] = array_pad(explode('-', $this->getState('id'), 2), 2, null);

if ($account === null) {
throw new \Exception('Account was not set');
2 changes: 1 addition & 1 deletion api/components/com_media/src/Model/MediaModel.php
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ public function getItems(): array
['adapter' => $adapterName, 'path' => $path] = $this->resolveAdapterAndPath($this->getState('path', ''));
try {
$files = $this->mediaApiModel->getFiles($adapterName, $path, $options);
} catch (FileNotFoundException $e) {
} catch (FileNotFoundException) {
throw new ResourceNotFound(
Text::sprintf('WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND', $path),
404
16 changes: 8 additions & 8 deletions api/components/com_media/src/Model/MediumModel.php
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ public function getItem()

try {
return $this->mediaApiModel->getFile($adapterName, $path, $options);
} catch (FileNotFoundException $e) {
} catch (FileNotFoundException) {
throw new ResourceNotFound(
Text::sprintf('WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND', $path),
404
@@ -121,7 +121,7 @@ public function save($path = null): string
$this->mediaApiModel->move($adapterName, $oldPath, $path, $override),
'/'
);
} catch (FileNotFoundException $e) {
} catch (FileNotFoundException) {
throw new Save(
Text::sprintf(
'WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND',
@@ -159,23 +159,23 @@ public function save($path = null): string
);

$resultPath = $dirname . '/' . $name;
} catch (FileNotFoundException $e) {
} catch (FileNotFoundException) {
throw new Save(
Text::sprintf(
'WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND',
$dirname . '/' . $basename
),
404
);
} catch (FileExistsException $e) {
} catch (FileExistsException) {
throw new Save(
Text::sprintf(
'WEBSERVICE_COM_MEDIA_FILE_EXISTS',
$dirname . '/' . $basename
),
400
);
} catch (InvalidPathException $e) {
} catch (InvalidPathException) {
throw new Save(
Text::sprintf(
'WEBSERVICE_COM_MEDIA_BAD_FILE_TYPE',
@@ -201,15 +201,15 @@ public function save($path = null): string
$dirname,
$content
);
} catch (FileNotFoundException $e) {
} catch (FileNotFoundException) {
throw new Save(
Text::sprintf(
'WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND',
$dirname . '/' . $basename
),
404
);
} catch (InvalidPathException $e) {
} catch (InvalidPathException) {
throw new Save(
Text::sprintf(
'WEBSERVICE_COM_MEDIA_BAD_FILE_TYPE',
@@ -250,7 +250,7 @@ public function delete(): void

try {
$this->mediaApiModel->delete($adapterName, $path);
} catch (FileNotFoundException $e) {
} catch (FileNotFoundException) {
throw new Save(
Text::sprintf('WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND', $path),
404
2 changes: 1 addition & 1 deletion api/index.php
Original file line number Diff line number Diff line change
@@ -28,4 +28,4 @@
\define('_JEXEC', 1);

// Run the application - All executable code should be triggered through this file
require_once \dirname(__FILE__) . '/includes/app.php';
require_once __DIR__ . '/includes/app.php';
Original file line number Diff line number Diff line change
@@ -34,9 +34,8 @@
a {
color: var(--body-color);
}
&::before,
&::after {
border: none;
border-inline-start-color: $breadcrumbs-current-bg;
}
}
&:hover {
@@ -62,7 +61,7 @@
border-inline-start: 10px solid transparent;
}
&::before {
border-inline-start-color: $border-color;
border-inline-start-color: var(--gray-400);
}
&::after {
border-inline-start-color: $breadcrumbs-bg;
15 changes: 3 additions & 12 deletions build/media_source/vendor/bootstrap/js/carousel.es6.js
Original file line number Diff line number Diff line change
@@ -4,21 +4,12 @@ window.bootstrap = window.bootstrap || {};
window.bootstrap.Carousel = Carousel;

if (Joomla && Joomla.getOptions) {
// Get the elements/configurations from the PHP
// Get the elements configuration from PHP
const carousels = Joomla.getOptions('bootstrap.carousel');
// Initialise the elements

if (typeof carousels === 'object' && carousels !== null) {
Object.keys(carousels).forEach((carousel) => {
const opt = carousels[carousel];
const options = {
interval: opt.interval ? opt.interval : 5000,
keyboard: opt.keyboard ? opt.keyboard : true,
pause: opt.pause ? opt.pause : 'hover',
slide: opt.slide ? opt.slide : false,
wrap: opt.wrap ? opt.wrap : true,
touch: opt.touch ? opt.touch : true,
};

const options = carousels[carousel];
const elements = Array.from(document.querySelectorAll(carousel));
if (elements.length) {
elements.map((el) => new window.bootstrap.Carousel(el, options));
1 change: 0 additions & 1 deletion components/com_contact/forms/contact.xml
Original file line number Diff line number Diff line change
@@ -58,7 +58,6 @@
type="checkbox"
label="COM_CONTACT_CONTACT_EMAIL_A_COPY_LABEL"
id="contact-email-copy"
default="0"
/>
</fieldset>

Original file line number Diff line number Diff line change
@@ -364,7 +364,7 @@ protected function allowEdit($data = [], $key = 'id')

// Fallback on edit.own.
if ($user->authorise('core.edit.own', $this->option . '.category.' . $categoryId)) {
return ($record->created_by === $user->id);
return $record->created_by === $user->id;
}

return false;
2 changes: 1 addition & 1 deletion components/com_content/helpers/icon.php
Original file line number Diff line number Diff line change
@@ -125,6 +125,6 @@ public static function print_screen($article, $params, $attribs = [], $legacy =
*/
private static function getIcon()
{
return (new \Joomla\Component\Content\Administrator\Service\HTML\Icon(Joomla\CMS\Factory::getApplication()));
return new \Joomla\Component\Content\Administrator\Service\HTML\Icon(Joomla\CMS\Factory::getApplication());
}
}
4 changes: 0 additions & 4 deletions components/com_content/src/View/Category/HtmlView.php
Original file line number Diff line number Diff line change
@@ -167,10 +167,6 @@ public function display($tpl = null)
$this->category->metadata = new Registry($this->category->metadata);
}

if (($app->get('MetaAuthor') == '1') && $this->category->get('author', '')) {
$this->getDocument()->setMetaData('author', $this->category->get('author', ''));
}

$mdata = $this->category->metadata->toArray();

foreach ($mdata as $k => $v) {
2 changes: 1 addition & 1 deletion components/com_finder/src/Model/SearchModel.php
Original file line number Diff line number Diff line change
@@ -543,7 +543,7 @@ protected function populateState($ordering = null, $direction = null)
$this->setState('list.ordering', 'l.sale_price');
break;

case ($order === 'relevance' && !empty($this->includedTerms)):
case $order === 'relevance' && !empty($this->includedTerms):
$this->setState('list.ordering', 'm.weight');
break;

2 changes: 1 addition & 1 deletion components/com_finder/src/Service/Router.php
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ public function build(&$query)
if (isset($query['Itemid'])) {
$item = $this->menu->getItem($query['Itemid']);

if ($query['option'] == 'com_finder' && isset($query['f']) && isset($item->query['f']) && $query['f'] == $item->query['f']) {
if ($query['option'] == 'com_finder' && isset($query['f'], $item->query['f']) && $query['f'] == $item->query['f']) {
unset($query['f']);
}
}
2 changes: 1 addition & 1 deletion components/com_finder/src/View/Search/HtmlView.php
Original file line number Diff line number Diff line change
@@ -299,7 +299,7 @@ protected function getLayoutFile($layout = null)
$filetofind = $this->_createFileName('template', ['name' => $file]);
$exists = Path::find($this->_path['template'], $filetofind);

return ($exists ? $layout : 'result');
return $exists ? $layout : 'result';
}

/**
10 changes: 10 additions & 0 deletions components/com_privacy/src/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
@@ -36,6 +36,16 @@ protected function checkAccess()
parent::checkAccess();

$view = $this->input->get('view');
$task = $this->input->get('task', 'display');

// Ignore any-non-"display" tasks
if (str_contains($task, '.')) {
$task = explode('.', $task)[1];
}

if ($task !== 'display') {
return;
}

// Submitting information requests and confirmation through the frontend is restricted to authenticated users at this time
if (\in_array($view, ['confirm', 'request']) && $this->app->getIdentity()->guest) {
2 changes: 1 addition & 1 deletion components/com_tags/src/Service/Router.php
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ public function preprocess($query)

foreach (array_unique([$lang, '*']) as $language) {
if (isset($query['view']) && $query['view'] === 'tags') {
if (isset($query['parent_id']) && isset($this->lookup[$language]['tags'][$query['parent_id']])) {
if (isset($query['parent_id'], $this->lookup[$language]['tags'][$query['parent_id']])) {
$query['Itemid'] = $this->lookup[$language]['tags'][$query['parent_id']];
break;
}
10 changes: 10 additions & 0 deletions components/com_users/src/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
@@ -38,6 +38,16 @@ protected function checkAccess()

$view = $this->input->get('view');
$user = $this->app->getIdentity();
$task = $this->input->get('task', 'display');

// Ignore any-non-"display" tasks
if (str_contains($task, '.')) {
$task = explode('.', $task)[1];
}

if ($task !== 'display') {
return;
}

// Do any specific processing by view.
switch ($view) {
4 changes: 2 additions & 2 deletions components/com_users/src/View/Profile/HtmlView.php
Original file line number Diff line number Diff line change
@@ -141,8 +141,8 @@ public function display($tpl = null)
$active = Factory::getApplication()->getMenu()->getActive();

if (
$active && isset($active->query['layout'])
&& isset($active->query['option']) && $active->query['option'] === 'com_users'
$active && isset($active->query['layout'], $active->query['option'])
&& $active->query['option'] === 'com_users'
&& isset($active->query['view']) && $active->query['view'] === 'profile'
) {
$this->setLayout($active->query['layout']);
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -29,4 +29,4 @@
define('_JEXEC', 1);

// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
require_once __DIR__ . '/includes/app.php';
2 changes: 1 addition & 1 deletion installation/index.php
Original file line number Diff line number Diff line change
@@ -29,4 +29,4 @@
\define('_JEXEC', 1);

// Run the application - All executable code should be triggered through this file
require_once \dirname(__FILE__) . '/includes/app.php';
require_once __DIR__ . '/includes/app.php';
2 changes: 1 addition & 1 deletion installation/joomla.php
Original file line number Diff line number Diff line change
@@ -36,4 +36,4 @@
\define('_JCLI_INSTALLATION', 1);

// Run the application - All executable code should be triggered through this file
require_once \dirname(__FILE__) . '/includes/cli.php';
require_once __DIR__ . '/includes/cli.php';
2 changes: 1 addition & 1 deletion installation/language/af-ZA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Afrikaans (Suid-Afrika)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Afrikaans Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ar-AA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Arabic (اللغة العربية)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Dr. Ashraf Damra</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/be-BY/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Belarusian (Belarus)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla Belarus Community</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/bg-BG/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Bulgarian (bg-BG)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Bulgaria</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ca-ES/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Catalan (ca-ES)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Catalan [ca-ES] Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/cs-CZ/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Czech (Čeština)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Czech Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/cy-GB/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Welsh (United Kingdom)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project - Welsh Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/da-DK/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Danish (Danmark)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Danish Translation Team (Transl.: Ronny Buelund)</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/el-GR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Greek (el-GR)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Ομάδα Μετάφρασης: joomla. gr</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/en-AU/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>English (Australia)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/en-CA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>English (Canada)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/en-NZ/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>English (New Zealand)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/en-US/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>English (United States)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/es-ES/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Spanish (es-ES)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Spanish [es-ES] Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/et-EE/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Estonian</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/eu-ES/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Basque</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Basque Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/fa-AF/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>فارسی (دری)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>JoomlaPersian Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/fa-IR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Persian (fa-IR)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Persian Translation Team: joomlafarsi.com</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/fi-FI/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Finnish (Finland)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Finnish translation team: Joomla.fi</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/fr-CA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>French (Canada)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project - French translation team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/fr-FR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>French (fr-FR)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project - French translation team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/he-IL/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Hebrew (Israel)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>פרוייקט ג'ומלה</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/hr-HR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Hrvatski (Hrvatska)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Hrvatska team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/hu-HU/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Hungarian (Magyar)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Magyarország</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/id-ID/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Bahasa Indonesia (id-ID)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Indonesia</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/it-IT/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Italiano (it-IT)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project (Italian Translation Team)</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ja-JP/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Japanese (Japan)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla!じゃぱん</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ka-GE/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Georgian (Georgia)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Georgian Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/kk-KZ/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Kazakh (Kazakhstan)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Sarvarov Akylkerey</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ko-KR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Korean (Republic of Korea)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! 프로젝트</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/lt-LT/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Lietuvių (lt-LT)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Oskaras Jankauskas</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/lv-LV/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Latvian (Latvia)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Projekts</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/mk-MK/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Macedonian (mk-MK)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/nl-BE/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Dutch (Belgium)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Dutch (BE) translation team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/nl-NL/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Dutch (nl-NL)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Dutch Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/pl-PL/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Polski (PL)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Projekt Joomla!</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/pt-BR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Portuguese (Brazil)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Projeto Joomla!</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/pt-PT/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Português (Portugal)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Comunidade JoomlaPortugal</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ro-RO/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Română (România)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Horia Negura - Quanta</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/sk-SK/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Slovak (Slovakia)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Slovak translation team : Peter Michnica</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/sl-SI/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Slovenščina (Slovenija)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Slovenska prevajalska ekipa</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/sr-YU/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Srpski (Republika Srbija)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Goran Nešić - UIX Web Design &amp; Saša Matić Bardak.RS</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/sv-SE/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Swedish (Sweden)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Swedish Translation Team - SvenskJoomla</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ta-IN/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Tamil (India)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Ilagnayeru 'MIG' Manickam, Elango Samy Manim</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/th-TH/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Thai (ภาษาไทย)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Thai Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/tr-TR/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Turkish (Turkey)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Türkiye</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/uk-UA/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Ukrainian (uk-UA)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Denys Nosov</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/ur-PK/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Urdu (ur-PK)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Urdu Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/vi-VN/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Vietnamese (Vietnam)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/zh-CN/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>Chinese Simplified (China)</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>Joomla中文网</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
2 changes: 1 addition & 1 deletion installation/language/zh-TW/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<metafile client="installation">
<name>正體中文</name>
<version>5.2.4</version>
<creationDate>2025-01</creationDate>
<creationDate>2025-02</creationDate>
<author>正體中文 Translation Team</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
1 change: 1 addition & 0 deletions installation/src/Model/ConfigurationModel.php
Original file line number Diff line number Diff line change
@@ -371,6 +371,7 @@ public function createConfiguration($options)
$registry->set('captcha', '0');
$registry->set('list_limit', 20);
$registry->set('access', 1);
$registry->set('frontediting', 1);

// Debug settings.
$registry->set('debug', false);
4 changes: 2 additions & 2 deletions language/en-GB/mod_articles_category.ini
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_CATEGORY="Articles - Category"
MOD_ARTICLES_CATEGORY="Articles - Category (Legacy)"
MOD_ARTICLES_CATEGORY_FIELD_ARTICLEGROUPING_LABEL="Article Grouping"
MOD_ARTICLES_CATEGORY_FIELD_ARTICLEGROUPINGDIR_LABEL="Grouping Direction"
MOD_ARTICLES_CATEGORY_FIELD_ARTICLEORDERING_LABEL="Article Field to Order By"
@@ -72,4 +72,4 @@ MOD_ARTICLES_CATEGORY_READ_MORE="Read more: "
MOD_ARTICLES_CATEGORY_READ_MORE_TITLE="Read More &hellip;"
MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE="Register to read more"
MOD_ARTICLES_CATEGORY_UNTAGGED="Untagged"
MOD_ARTICLES_CATEGORY_XML_DESCRIPTION="This module displays a list of articles from one or more categories."
MOD_ARTICLES_CATEGORY_XML_DESCRIPTION="This module displays a list of articles from one or more categories. This module is superseded by the \"Articles\" module."
4 changes: 2 additions & 2 deletions language/en-GB/mod_articles_category.sys.ini
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_CATEGORY="Articles - Category"
MOD_ARTICLES_CATEGORY="Articles - Category (Legacy)"
MOD_ARTICLES_CATEGORY_LAYOUT_DEFAULT="Default"
MOD_ARTICLES_CATEGORY_XML_DESCRIPTION="This module displays a list of articles from one or more categories."
MOD_ARTICLES_CATEGORY_XML_DESCRIPTION="This module displays a list of articles from one or more categories. This module is superseded by the \"Articles\" module."
4 changes: 2 additions & 2 deletions language/en-GB/mod_articles_latest.ini
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_LATEST="Articles - Latest"
MOD_ARTICLES_LATEST="Articles - Latest (Legacy)"
MOD_LATEST_NEWS_FIELD_AUTHOR_LABEL="Created by Author(s)"
MOD_LATEST_NEWS_FIELD_COUNT_LABEL="Articles to Display"
MOD_LATEST_NEWS_FIELD_FEATURED_LABEL="Featured Articles"
@@ -19,4 +19,4 @@ MOD_LATEST_NEWS_VALUE_RECENT_MODIFIED="Recently Modified First"
MOD_LATEST_NEWS_VALUE_RECENT_PUBLISHED="Recently Published First"
MOD_LATEST_NEWS_VALUE_RECENT_RAND="Random Articles"
MOD_LATEST_NEWS_VALUE_RECENT_TOUCHED="Recently Touched First"
MOD_LATEST_NEWS_XML_DESCRIPTION="This module shows a list of the most recently published and current Articles."
MOD_LATEST_NEWS_XML_DESCRIPTION="This module shows a list of the most recently published and current Articles. This module is superseded by the \"Articles\" module."
4 changes: 2 additions & 2 deletions language/en-GB/mod_articles_latest.sys.ini
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_LATEST="Articles - Latest"
MOD_ARTICLES_LATEST="Articles - Latest (Legacy)"
MOD_ARTICLES_LATEST_LAYOUT_DEFAULT="Default"
MOD_LATEST_NEWS_XML_DESCRIPTION="This module shows a list of the most recently published and current Articles."
MOD_LATEST_NEWS_XML_DESCRIPTION="This module shows a list of the most recently published and current Articles. This module is superseded by the \"Articles\" module."
4 changes: 2 additions & 2 deletions language/en-GB/mod_articles_news.ini
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_NEWS="Articles - Newsflash"
MOD_ARTICLES_NEWS="Articles - Newsflash (Legacy)"
MOD_ARTICLES_NEWS_FIELD_EXCLUDE_CURRENT_LABEL="Exclude Current Article"
MOD_ARTICLES_NEWS_FIELD_FEATURED_LABEL="Featured Articles"
MOD_ARTICLES_NEWS_FIELD_IMAGES_ARTICLE_LABEL="Show Intro/Full Image"
@@ -28,4 +28,4 @@ MOD_ARTICLES_NEWS_READMORE="Read more &hellip;"
MOD_ARTICLES_NEWS_READMORE_REGISTER="Register to Read More"
MOD_ARTICLES_NEWS_TITLE_HEADING="Header Level"
MOD_ARTICLES_NEWS_VALUE_ONLY_SHOW_FEATURED="Only show Featured Articles"
MOD_ARTICLES_NEWS_XML_DESCRIPTION="The Article Newsflash Module will display a fixed number of Articles from a specific Category or a set of Categories."
MOD_ARTICLES_NEWS_XML_DESCRIPTION="The Article Newsflash Module will display a fixed number of Articles from a specific Category or a set of Categories. This module is superseded by the \"Articles\" module."
6 changes: 3 additions & 3 deletions language/en-GB/mod_articles_news.sys.ini
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_NEWS="Articles - Newsflash"
MOD_ARTICLES_NEWS="Articles - Newsflash (Legacy)"
MOD_ARTICLES_NEWS_LAYOUT_DEFAULT="Default"
MOD_ARTICLES_NEWS_LAYOUT_HORIZONTAL="Horizontal"
MOD_ARTICLES_NEWS_LAYOUT_HORIZONTAL="Horizontal"
MOD_ARTICLES_NEWS_LAYOUT_VERTICAL="Vertical"
MOD_ARTICLES_NEWS_XML_DESCRIPTION="The Newsflash Module will display a fixed number of articles from a specific category."
MOD_ARTICLES_NEWS_XML_DESCRIPTION="The Newsflash Module will display a fixed number of articles from a specific category. This module is superseded by the \"Articles\" module."
4 changes: 2 additions & 2 deletions language/en-GB/mod_articles_popular.ini
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_POPULAR="Articles - Most Read"
MOD_ARTICLES_POPULAR="Articles - Most Read (Legacy)"
MOD_POPULAR_FIELD_COUNT_LABEL="Articles to Display"
MOD_POPULAR_FIELD_DATEFIELD_LABEL="Date Field"
MOD_POPULAR_FIELD_DATEFILTERING_LABEL="Date Filtering"
@@ -17,4 +17,4 @@ MOD_POPULAR_OPTION_MODIFIED_VALUE="Modified Date"
MOD_POPULAR_OPTION_OFF_VALUE="Off"
MOD_POPULAR_OPTION_RELATIVEDAY_VALUE="Relative Date"
MOD_POPULAR_OPTION_STARTPUBLISHING_VALUE="Start Publishing Date"
MOD_POPULAR_XML_DESCRIPTION="This module shows a list of the published Articles which have the highest number of page views."
MOD_POPULAR_XML_DESCRIPTION="This module shows a list of the published Articles which have the highest number of page views. This module is superseded by the \"Articles\" module."
4 changes: 2 additions & 2 deletions language/en-GB/mod_articles_popular.sys.ini
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

MOD_ARTICLES_POPULAR="Articles - Most Read"
MOD_ARTICLES_POPULAR="Articles - Most Read (Legacy)"
MOD_ARTICLES_POPULAR_LAYOUT_DEFAULT="Default"
MOD_POPULAR_XML_DESCRIPTION="This module shows a list of the published Articles which have the highest number of page views."
MOD_POPULAR_XML_DESCRIPTION="This module shows a list of the published Articles which have the highest number of page views. This module is superseded by the \"Articles\" module."
6 changes: 2 additions & 4 deletions libraries/src/Application/CMSApplication.php
Original file line number Diff line number Diff line change
@@ -249,10 +249,8 @@ public function enqueueMessage($msg, $type = self::MSG_INFO)
'type' => $inputFilter->clean(strtolower($type), 'cmd'),
];

// For empty queue, if messages exists in the session, enqueue them first.
$messages = $this->getMessageQueue();

if (!\in_array($message, $this->messageQueue)) {
// Get the messages of the session and add the new message if it is not already in the queue.
if (!\in_array($message, $this->getMessageQueue())) {
// Enqueue the message.
$this->messageQueue[] = $message;
}
3 changes: 1 addition & 2 deletions libraries/src/Changelog/Changelog.php
Original file line number Diff line number Diff line change
@@ -288,8 +288,7 @@ public function endElement($parser, $name)
$this->$key = $val;
}

unset($this->latest);
unset($this->currentChangelog);
unset($this->latest, $this->currentChangelog);
} elseif (isset($this->currentChangelog)) {
// The update might be for an older version of j!
unset($this->currentChangelog);
2 changes: 1 addition & 1 deletion libraries/src/Client/FtpClient.php
Original file line number Diff line number Diff line change
@@ -344,7 +344,7 @@ public function connect($host = '127.0.0.1', $port = 21)
*/
public function isConnected()
{
return ($this->_conn);
return $this->_conn;
}

/**
2 changes: 1 addition & 1 deletion libraries/src/Component/Router/RouterView.php
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ public function getPath($query)
$result = [];

// Get the right view object
if (isset($query['view']) && isset($views[$query['view']])) {
if (isset($query['view'], $views[$query['view']])) {
$viewobj = $views[$query['view']];
}

2 changes: 1 addition & 1 deletion libraries/src/Component/Router/Rules/NomenuRules.php
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ public function parse(&$segments, &$vars)
$vars['view'] = array_shift($segments);
$view = $views[$vars['view']];

if (isset($view->key) && isset($segments[0])) {
if (isset($view->key, $segments[0])) {
if (\is_callable([$this->router, 'get' . ucfirst($view->name) . 'Id'])) {
$input = $this->router->app->getInput();
if ($view->parent_key && $input->get($view->parent_key)) {
4 changes: 2 additions & 2 deletions libraries/src/Console/SetConfigurationCommand.php
Original file line number Diff line number Diff line change
@@ -133,7 +133,7 @@ private function retrieveOptionsFromInput(array $options): bool
return false;
}

list($option, $value) = explode('=', $option);
[$option, $value] = explode('=', $option);

$collected[$option] = $value;
}
@@ -205,7 +205,7 @@ public function getOptions()
*/
public function getInitialConfigurationOptions(): Registry
{
return (new Registry(new \JConfig()));
return new Registry(new \JConfig());
}


2 changes: 1 addition & 1 deletion libraries/src/Dispatcher/ComponentDispatcher.php
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ public function dispatch()
// Check for a controller.task command.
if (str_contains($command, '.')) {
// Explode the controller.task command.
list($controller, $task) = explode('.', $command);
[$controller, $task] = explode('.', $command);

$this->input->set('controller', $controller);
$this->input->set('task', $task);
2 changes: 1 addition & 1 deletion libraries/src/Document/Renderer/Html/MessageRenderer.php
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ private function getData()
// Build the sorted message list
if (\is_array($messages) && !empty($messages)) {
foreach ($messages as $msg) {
if (isset($msg['type']) && isset($msg['message'])) {
if (isset($msg['type'], $msg['message'])) {
$lists[$msg['type']][] = $msg['message'];
}
}
22 changes: 11 additions & 11 deletions libraries/src/Environment/Browser.php
Original file line number Diff line number Diff line change
@@ -562,7 +562,7 @@ public function match($userAgent = null, $accept = null)
$this->setBrowser('edge');

if (str_contains($version[1], '.')) {
list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);
} else {
$this->majorVersion = $version[1];
$this->minorVersion = 0;
@@ -574,11 +574,11 @@ public function match($userAgent = null, $accept = null)
*/
$this->setBrowser('edg');

list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);
} elseif (preg_match('|Opera[\/ ]([0-9.]+)|', $this->agent, $version)) {
$this->setBrowser('opera');

list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);

/*
* Due to changes in Opera UA, we need to check Version/xx.yy,
@@ -591,15 +591,15 @@ public function match($userAgent = null, $accept = null)
// Opera 15+
$this->setBrowser('opera');

list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);
} elseif (
preg_match('/Chrome[\/ ]([0-9.]+)/i', $this->agent, $version)
|| preg_match('/CrMo[\/ ]([0-9.]+)/i', $this->agent, $version)
|| preg_match('/CriOS[\/ ]([0-9.]+)/i', $this->agent, $version)
) {
$this->setBrowser('chrome');

list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);
} elseif (
str_contains($this->lowerAgent, 'elaine/')
|| str_contains($this->lowerAgent, 'palmsource')
@@ -620,7 +620,7 @@ public function match($userAgent = null, $accept = null)
}

if (str_contains($version[1], '.')) {
list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);
} else {
$this->majorVersion = $version[1];
$this->minorVersion = 0;
@@ -653,7 +653,7 @@ public function match($userAgent = null, $accept = null)
} elseif (preg_match('|Firefox\/([0-9.]+)|', $this->agent, $version)) {
$this->setBrowser('firefox');

list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);
} elseif (preg_match('|Lynx\/([0-9]+)|', $this->agent, $version)) {
$this->setBrowser('lynx');
} elseif (preg_match('|Links \(([0-9]+)|', $this->agent, $version)) {
@@ -683,7 +683,7 @@ public function match($userAgent = null, $accept = null)
} elseif (preg_match('|Mozilla\/([0-9.]+)|', $this->agent, $version)) {
$this->setBrowser('mozilla');

list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);
}
}
}
@@ -733,7 +733,7 @@ public function getPlatform()
protected function identifyBrowserVersion()
{
if (preg_match('|Version[/ ]([0-9.]+)|', $this->agent, $version)) {
list($this->majorVersion, $this->minorVersion) = explode('.', $version[1]);
[$this->majorVersion, $this->minorVersion] = explode('.', $version[1]);

return;
}
@@ -848,8 +848,8 @@ public function getHTTPProtocol()
*/
public function isViewable($mimetype)
{
$mimetype = strtolower($mimetype);
list($type, $subtype) = explode('/', $mimetype);
$mimetype = strtolower($mimetype);
[$type, $subtype] = explode('/', $mimetype);

if (!empty($this->accept)) {
$wildcard_match = false;
2 changes: 1 addition & 1 deletion libraries/src/Extension/ExtensionManagerTrait.php
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ private function loadExtension($type, $extensionName, $extensionPath)
$container->set($type, new Module(new ModuleDispatcherFactory(''), new HelperFactory('')));
break;
case PluginInterface::class:
list($pluginName, $pluginType) = explode(':', $extensionName);
[$pluginName, $pluginType] = explode(':', $extensionName);
$container->set($type, $this->loadPluginFromFilesystem($pluginName, $pluginType));
}
}
2 changes: 1 addition & 1 deletion libraries/src/Filter/InputFilter.php
Original file line number Diff line number Diff line change
@@ -218,7 +218,7 @@ public static function isSafeFile($file, $options = [])
// Make sure we can scan nested file descriptors
$descriptors = $file;

if (isset($file['name']) && isset($file['tmp_name'])) {
if (isset($file['name'], $file['tmp_name'])) {
$descriptors = static::decodeFileData(
[
$file['name'],
2 changes: 0 additions & 2 deletions libraries/src/Form/Field/ChromestyleField.php
Original file line number Diff line number Diff line change
@@ -155,8 +155,6 @@ protected function getGroups()
}
}

reset($groups);

return $groups;
}

2 changes: 0 additions & 2 deletions libraries/src/Form/Field/GroupedlistField.php
Original file line number Diff line number Diff line change
@@ -142,8 +142,6 @@ protected function getGroups()
}
}

reset($groups);

return $groups;
}

2 changes: 0 additions & 2 deletions libraries/src/Form/Field/HeadertagField.php
Original file line number Diff line number Diff line change
@@ -48,8 +48,6 @@ protected function getOptions()
$options[] = $tmp;
}

reset($options);

return $options;
}
}
2 changes: 0 additions & 2 deletions libraries/src/Form/Field/ListField.php
Original file line number Diff line number Diff line change
@@ -208,8 +208,6 @@ protected function getOptions()
array_unshift($options, $tmp);
}

reset($options);

return $options;
}

2 changes: 0 additions & 2 deletions libraries/src/Form/Field/ModuletagField.php
Original file line number Diff line number Diff line change
@@ -48,8 +48,6 @@ protected function getOptions()
$options[] = $tmp;
}

reset($options);

return $options;
}
}
2 changes: 1 addition & 1 deletion libraries/src/Form/Field/TimezoneField.php
Original file line number Diff line number Diff line change
@@ -133,7 +133,7 @@ protected function getGroups()
}

// Get the group/locale from the timezone.
list($group, $locale) = explode('/', $zone, 2);
[$group, $locale] = explode('/', $zone, 2);

// Only use known groups.
if (\in_array($group, self::$zones)) {
6 changes: 3 additions & 3 deletions libraries/src/Form/FormHelper.php
Original file line number Diff line number Diff line change
@@ -213,8 +213,8 @@ protected static function loadClass($entity, $type)
$subPrefix = '';

if (strpos($name, '.')) {
list($subPrefix, $name) = explode('.', $name);
$subPrefix = ucfirst($subPrefix) . '\\';
[$subPrefix, $name] = explode('.', $name);
$subPrefix = ucfirst($subPrefix) . '\\';
}

// Compile the classname
@@ -229,7 +229,7 @@ protected static function loadClass($entity, $type)
$prefix = 'J';

if (strpos($type, '.')) {
list($prefix, $type) = explode('.', $type);
[$prefix, $type] = explode('.', $type);
}

$class = StringHelper::ucfirst($prefix, '_') . 'Form' . StringHelper::ucfirst($entity, '_') . StringHelper::ucfirst($type, '_');
2 changes: 1 addition & 1 deletion libraries/src/Form/Rule/TimeRule.php
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ public function test(\SimpleXMLElement $element, $value, $group = null, ?Registr
}

// If min and max is set
if (isset($element['min']) && isset($element['max'])) {
if (isset($element['min'], $element['max'])) {
$min = $element['min'][0] . $element['min'][1];
$max = $element['max'][0] . $element['max'][1];

18 changes: 9 additions & 9 deletions libraries/src/HTML/HTMLHelper.php
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ protected static function extract($key)
*/
final public static function _(string $key, ...$methodArgs)
{
list($key, $prefix, $file, $func) = static::extract($key);
[$key, $prefix, $file, $func] = static::extract($key);

if (\array_key_exists($key, static::$registry)) {
$function = static::$registry[$key];
@@ -215,7 +215,7 @@ public static function register($key, callable $function)
E_USER_DEPRECATED
);

list($key) = static::extract($key);
[$key] = static::extract($key);

static::$registry[$key] = $function;

@@ -240,7 +240,7 @@ public static function unregister($key)
E_USER_DEPRECATED
);

list($key) = static::extract($key);
[$key] = static::extract($key);

if (isset(static::$registry[$key])) {
unset(static::$registry[$key]);
@@ -262,7 +262,7 @@ public static function unregister($key)
*/
public static function isRegistered($key)
{
list($key) = static::extract($key);
[$key] = static::extract($key);

return isset(static::$registry[$key]);
}
@@ -480,12 +480,12 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
// If the file contains any /: it can be in a media extension subfolder
if (strpos($file, '/')) {
// Divide the file extracting the extension as the first part before /
list($extension, $file) = explode('/', $file, 2);
[$extension, $file] = explode('/', $file, 2);

// If the file yet contains any /: it can be a plugin
if (strpos($file, '/')) {
// Divide the file extracting the element as the first part before /
list($element, $file) = explode('/', $file, 2);
[$element, $file] = explode('/', $file, 2);

// Try to deal with plugins group in the media folder
$found = static::addFileToBuffer(JPATH_PUBLIC . "/media/$extension/$element/$folder/$file", $ext, $debugMode);
@@ -761,8 +761,8 @@ public static function image($file, $alt, $attribs = null, $relative = false, $r
}

// Set the attribute
list($key, $value) = explode('=', $attribute);
$attributes[$key] = trim($value, '"');
[$key, $value] = explode('=', $attribute);
$attributes[$key] = trim($value, '"');
}

// Add the attributes from the string to the original attributes
@@ -1038,7 +1038,7 @@ public static function tooltipText($title = '', $content = '', $translate = true
if ($content !== '' || $title !== '') {
// Split title into title and content if the title contains '::' (old Mootools format).
if ($content === '' && !(!str_contains($title, '::'))) {
list($title, $content) = explode('::', $title, 2);
[$title, $content] = explode('::', $title, 2);
}

// Pass texts through Text if required.
65 changes: 48 additions & 17 deletions libraries/src/HTML/Helpers/Bootstrap.php
Original file line number Diff line number Diff line change
@@ -125,35 +125,66 @@ public static function button($selector = ''): void
*
* Options for the carousel can be:
* - interval number 5000 The amount of time to delay between automatically cycling an item.
* If false, carousel will not automatically cycle.
* - keyboard boolean true Whether the carousel should react to keyboard events.
* - pause string| hover Pauses the cycling of the carousel on mouseenter and resumes the cycling
* boolean of the carousel on mouseleave.
* - slide string| false Autoplays the carousel after the user manually cycles the first item.
* boolean If "carousel", autoplays the carousel on load.
* - pause string| hover If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the
* boolean cycling of the carousel on mouseleave. If set to false, hovering over the carousel won’t
* pause it. On touch-enabled devices, when set to "hover", cycling will pause on touchend
* (once the user finished interacting with the carousel) for two intervals, before
* automatically resuming. This is in addition to the mouse behavior.
* - ride string| false If set to true, autoplays the carousel after the user manually cycles the first item. If set
* boolean to "carousel", autoplays the carousel on load.
* - touch boolean true Whether the carousel should support left/right swipe interactions on touchscreen devices.
* - wrap boolean true Whether the carousel should cycle continuously or have hard stops.
*/
public static function carousel($selector = '', $params = []): void
{
// Only load once
if (!empty(static::$loaded[__METHOD__][$selector])) {
return;
}

if ($selector !== '') {
// Setup options object
$opt = [
'interval' => (int) ($params['interval'] ?? 5000),
'keyboard' => (bool) ($params['keyboard'] ?? true),
'pause' => $params['pause'] ?? 'hover',
'slide' => (bool) ($params['slide'] ?? false),
'wrap' => (bool) ($params['wrap'] ?? true),
'touch' => (bool) ($params['touch'] ?? true),
];
$opt['interval'] = 5000;

if (isset($params['interval']) && is_numeric($params['interval'])) {
$opt['interval'] = (int) $params['interval'];
}

$opt['keyboard'] = true;

if (isset($params['keyboard']) && \is_bool($params['keyboard'])) {
$opt['keyboard'] = $params['keyboard'];
}

$opt['pause'] = 'hover';

if (isset($params['pause']) && \in_array($params['pause'], ['hover', false], true)) {
$opt['pause'] = $params['pause'];
}

$opt['ride'] = false;

if (isset($params['ride']) && \in_array($params['ride'], ['carousel', true, false], true)) {
$opt['ride'] = $params['ride'];
}

$opt['touch'] = true;

Factory::getDocument()->addScriptOptions('bootstrap.carousel', [$selector => (object) array_filter($opt)]);
if (isset($params['touch']) && \is_bool($params['touch'])) {
$opt['touch'] = $params['touch'];
}

$opt['wrap'] = true;

if (isset($params['wrap']) && \is_bool($params['wrap'])) {
$opt['wrap'] = $params['wrap'];
}

Factory::getApplication()->getDocument()->addScriptOptions(
'bootstrap.carousel',
[$selector => (object) $opt]
);
}

// Include the Bootstrap component
Factory::getApplication()
->getDocument()
->getWebAssetManager()
2 changes: 1 addition & 1 deletion libraries/src/HTML/Helpers/Number.php
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ public static function bytes($bytes, $unit = 'auto', $precision = 2, $iec = fals
$oBytes = $bytes;
} else {
preg_match('/(.*?)\s?((?:[KMGTPEZY]i?)?B?)$/i', trim($bytes), $matches);
list(, $oBytes, $oUnit) = $matches;
[, $oBytes, $oUnit] = $matches;

if ($oUnit && is_numeric($oBytes)) {
$oBase = $iec && !str_contains($oUnit, 'i') ? 1000 : 1024;
4 changes: 2 additions & 2 deletions libraries/src/HTML/Helpers/Select.php
Original file line number Diff line number Diff line change
@@ -244,7 +244,7 @@ public static function groupedlist($data, $name, $options = [])
$noGroup = false;
}

if (isset($options['group.id']) && isset($group[$options['group.id']])) {
if (isset($options['group.id'], $group[$options['group.id']])) {
$id = $group[$options['group.id']];
$noGroup = false;
}
@@ -257,7 +257,7 @@ public static function groupedlist($data, $name, $options = [])
$noGroup = false;
}

if (isset($options['group.id']) && isset($group->{$options['group.id']})) {
if (isset($options['group.id'], $group->{$options['group.id']})) {
$id = $group->{$options['group.id']};
$noGroup = false;
}
2 changes: 1 addition & 1 deletion libraries/src/Helper/UserGroupsHelper.php
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ public function getAll()
*/
public function has($id)
{
return (\array_key_exists($id, $this->groups) && $this->groups[$id] !== false);
return \array_key_exists($id, $this->groups) && $this->groups[$id] !== false;
}

/**
4 changes: 2 additions & 2 deletions libraries/src/Image/Image.php
Original file line number Diff line number Diff line change
@@ -225,10 +225,10 @@ public function getOrientation()
private static function getOrientationString(int $width, int $height): string
{
switch (true) {
case ($width > $height):
case $width > $height:
return self::ORIENTATION_LANDSCAPE;

case ($width < $height):
case $width < $height:
return self::ORIENTATION_PORTRAIT;

default:
5 changes: 2 additions & 3 deletions libraries/src/Input/Cli.php
Original file line number Diff line number Diff line change
@@ -91,8 +91,7 @@ public function serialize()

// Remove $_ENV and $_SERVER from the inputs.
$inputs = $this->inputs;
unset($inputs['env']);
unset($inputs['server']);
unset($inputs['env'], $inputs['server']);

// Serialize the executable, args, options, data, and inputs.
return serialize([$this->executable, $this->args, $this->options, $this->data, $inputs]);
@@ -113,7 +112,7 @@ public function serialize()
public function unserialize($input)
{
// Unserialize the executable, args, options, data, and inputs.
list($this->executable, $this->args, $this->options, $this->data, $this->inputs) = unserialize($input);
[$this->executable, $this->args, $this->options, $this->data, $this->inputs] = unserialize($input);

// Load the filter.
if (isset($this->options['filter'])) {
2 changes: 1 addition & 1 deletion libraries/src/Input/Input.php
Original file line number Diff line number Diff line change
@@ -210,7 +210,7 @@ protected function getArrayRecursive(array $vars = [], $datasource = null, $defa
public function unserialize($input)
{
// Unserialize the options, data, and inputs.
list($this->options, $this->data, $this->inputs) = unserialize($input);
[$this->options, $this->data, $this->inputs] = unserialize($input);

// Load the filter.
if (isset($this->options['filter'])) {
2 changes: 1 addition & 1 deletion libraries/src/Installer/Manifest/LibraryManifest.php
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ protected function loadManifestFromData(\SimpleXMLElement $xml)
$this->packagerurl = (string) $xml->packagerurl;
$this->update = (string) $xml->update;

if (isset($xml->files) && isset($xml->files->file) && \count($xml->files->file)) {
if (isset($xml->files, $xml->files->file) && \count($xml->files->file)) {
foreach ($xml->files->file as $file) {
$this->filelist[] = (string) $file;
}
6 changes: 2 additions & 4 deletions libraries/src/MVC/Controller/AdminController.php
Original file line number Diff line number Diff line change
@@ -307,8 +307,7 @@ public function saveorder()
// Remove zero PKs and corresponding order values resulting from input filter for PK
foreach ($pks as $i => $pk) {
if ($pk === 0) {
unset($pks[$i]);
unset($order[$i]);
unset($pks[$i], $order[$i]);
}
}

@@ -402,8 +401,7 @@ public function saveOrderAjax()
// Remove zero PKs and corresponding order values resulting from input filter for PK
foreach ($pks as $i => $pk) {
if ($pk === 0) {
unset($pks[$i]);
unset($order[$i]);
unset($pks[$i], $order[$i]);
}
}

2 changes: 1 addition & 1 deletion libraries/src/MVC/Controller/BaseController.php
Original file line number Diff line number Diff line change
@@ -302,7 +302,7 @@ public static function getInstance($prefix, $config = [])
// Check for a controller.task command.
if (str_contains($command, '.')) {
// Explode the controller.task command.
list($type, $task) = explode('.', $command);
[$type, $task] = explode('.', $command);

// Define the controller filename and path.
$file = self::createFileName('controller', ['name' => $type, 'format' => $format]);
1 change: 1 addition & 0 deletions libraries/src/Mail/MailTemplate.php
Original file line number Diff line number Diff line change
@@ -333,6 +333,7 @@ public function send()
$this->addLayoutTemplateData([
'siteName' => $app->get('sitename'),
'lang' => substr($this->language, 0, 2),
'mail' => $mail,
]);

$layout = $config->get('mail_htmllayout', 'mailtemplate');
2 changes: 1 addition & 1 deletion libraries/src/Response/JsonResponse.php
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ public function __construct($response = null, $message = null, $error = false, $
// Build the sorted messages list
if (\is_array($messages) && \count($messages)) {
foreach ($messages as $message) {
if (isset($message['type']) && isset($message['message'])) {
if (isset($message['type'], $message['message'])) {
$lists[$message['type']][] = $message['message'];
}
}
2 changes: 1 addition & 1 deletion libraries/src/Table/Category.php
Original file line number Diff line number Diff line change
@@ -172,7 +172,7 @@ public function check()
return false;
}

$this->alias = trim($this->alias);
$this->alias = trim($this->alias ?? '');

if (empty($this->alias)) {
$this->alias = $this->title;
2 changes: 1 addition & 1 deletion libraries/src/Table/Content.php
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ public function bind($array, $ignore = '')
$this->introtext = $array['articletext'];
$this->fulltext = '';
} else {
list($this->introtext, $this->fulltext) = preg_split($pattern, $array['articletext'], 2);
[$this->introtext, $this->fulltext] = preg_split($pattern, $array['articletext'], 2);
}
}

2 changes: 1 addition & 1 deletion libraries/src/Table/ContentType.php
Original file line number Diff line number Diff line change
@@ -143,7 +143,7 @@ public function getContentTable()
$tableInfo = json_decode($this->table);

if (\is_object($tableInfo) && isset($tableInfo->special)) {
if (\is_object($tableInfo->special) && isset($tableInfo->special->type) && isset($tableInfo->special->prefix)) {
if (\is_object($tableInfo->special) && isset($tableInfo->special->type, $tableInfo->special->prefix)) {
$class = $tableInfo->special->class ?? 'Joomla\\CMS\\Table\\Table';

if (!class_implements($class, 'Joomla\\CMS\\Table\\TableInterface')) {
2 changes: 1 addition & 1 deletion libraries/src/Table/Nested.php
Original file line number Diff line number Diff line change
@@ -1556,7 +1556,7 @@ protected function _getNode($id, $key = null)
protected function _getTreeRepositionData($referenceNode, $nodeWidth, $position = 'before')
{
// Make sure the reference an object with a left and right id.
if (!\is_object($referenceNode) || !(isset($referenceNode->lft) && isset($referenceNode->rgt))) {
if (!\is_object($referenceNode) || !(isset($referenceNode->lft, $referenceNode->rgt))) {
return false;
}

3 changes: 1 addition & 2 deletions libraries/src/Updater/Update.php
Original file line number Diff line number Diff line change
@@ -487,8 +487,7 @@ public function _endElement($parser, $name)
$this->$key = $val;
}

unset($this->latest);
unset($this->currentUpdate);
unset($this->latest, $this->currentUpdate);
} elseif (isset($this->currentUpdate)) {
// The update might be for an older version of j!
unset($this->currentUpdate);
10 changes: 6 additions & 4 deletions libraries/src/User/User.php
Original file line number Diff line number Diff line change
@@ -658,10 +658,12 @@ public function bind(&$array)
}

// Prevent updating internal fields
unset($array['registerDate']);
unset($array['lastvisitDate']);
unset($array['lastResetTime']);
unset($array['resetCount']);
unset(
$array['registerDate'],
$array['lastvisitDate'],
$array['lastResetTime'],
$array['resetCount']
);
}

if (\array_key_exists('params', $array)) {
Original file line number Diff line number Diff line change
@@ -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 [];
2 changes: 1 addition & 1 deletion modules/mod_feed/src/Helper/FeedHelper.php
Original file line number Diff line number Diff line change
@@ -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');
}

4 changes: 2 additions & 2 deletions modules/mod_related_items/src/Helper/RelatedItemsHelper.php
Original file line number Diff line number Diff line change
@@ -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 [];
@@ -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 [];
6 changes: 3 additions & 3 deletions modules/mod_stats/src/Helper/StatsHelper.php
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ public function getStats(Registry &$params, CMSApplicationInterface $app)

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

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

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

@@ -154,7 +154,7 @@ public function getStats(Registry &$params, CMSApplicationInterface $app)
foreach ($arrays as $response) {
foreach ($response as $row) {
// We only add a row if the title and data are given
if (isset($row['title']) && isset($row['data'])) {
if (isset($row['title'], $row['data'])) {
$rows[$i] = new \stdClass();
$rows[$i]->title = $row['title'];
$rows[$i]->icon = $row['icon'] ?? 'info';
2 changes: 1 addition & 1 deletion modules/mod_tags_similar/src/Helper/TagsSimilarHelper.php
Original file line number Diff line number Diff line change
@@ -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');
}
2 changes: 1 addition & 1 deletion modules/mod_users_latest/src/Helper/UsersLatestHelper.php
Original file line number Diff line number Diff line change
@@ -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 [];
4 changes: 2 additions & 2 deletions modules/mod_whosonline/src/Helper/WhosonlineHelper.php
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ public static function getOnlineCount()

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

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

try {
return (array) $db->loadObjectList();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
return [];
}
}
2 changes: 1 addition & 1 deletion modules/mod_wrapper/src/Helper/WrapperHelper.php
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ public function getParamsWrapper(Registry $params, SiteApplication $app)
if (str_starts_with($url, '/')) {
// Relative URL in component. use server http_host.
$url = 'http://' . $app->getInput()->server->get('HTTP_HOST') . $url;
} elseif (!str_contains($url, 'http') && !str_contains($url, 'https')) {
} elseif (!str_starts_with($url, 'http://') && !str_starts_with($url, 'https://')) {
$url = 'http://' . $url;
}
}
10 changes: 5 additions & 5 deletions plugins/actionlog/joomla/src/Extension/Joomla.php
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@ public function onContentAfterSave(Model\AfterSaveEvent $event): void
return;
}

list($option, $contentType) = explode('.', $params->type_alias);
[$option, $contentType] = explode('.', $params->type_alias);

if (!$this->checkLoggable($option)) {
return;
@@ -272,7 +272,7 @@ public function onContentChangeState(Model\AfterChangeStateEvent $event): void
return;
}

list(, $contentType) = explode('.', $params->type_alias);
[, $contentType] = explode('.', $params->type_alias);

switch ($value) {
case 0:
@@ -316,7 +316,7 @@ public function onContentChangeState(Model\AfterChangeStateEvent $event): void

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

@@ -544,7 +544,7 @@ public function onExtensionAfterSave(Model\AfterSaveEvent $event): void
return;
}

list(, $contentType) = explode('.', $params->type_alias);
[, $contentType] = explode('.', $params->type_alias);

if ($isNew) {
$messageLanguageKey = $params->text_prefix . '_' . $params->type_title . '_ADDED';
@@ -875,7 +875,7 @@ public function onUserLoginFailure(User\LoginFailureEvent $event): void

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

8 changes: 4 additions & 4 deletions plugins/api-authentication/token/src/Extension/Token.php
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ public function onUserAuthenticate(AuthenticationEvent $event): void
return;
}

list($algo, $userId, $tokenHMAC) = $parts;
[$algo, $userId, $tokenHMAC] = $parts;

/**
* Verify the HMAC algorithm requested in the token string is allowed
@@ -180,7 +180,7 @@ public function onUserAuthenticate(AuthenticationEvent $event): void
*/
try {
$siteSecret = $this->getApplication()->get('secret');
} catch (\Exception $e) {
} catch (\Exception) {
return;
}

@@ -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;
}
}
@@ -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;
}
}
8 changes: 4 additions & 4 deletions plugins/authentication/cookie/src/Extension/Cookie.php
Original file line number Diff line number Diff line change
@@ -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;
@@ -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
@@ -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
}
}
@@ -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
}

2 changes: 1 addition & 1 deletion plugins/authentication/ldap/src/Extension/Ldap.php
Original file line number Diff line number Diff line change
@@ -143,7 +143,7 @@ public function onUserAuthenticate(AuthenticationEvent $event): void
],
];
// if these are not set, the system defaults are used
if (isset($cacertdir) && isset($cacertfile)) {
if (isset($cacertdir, $cacertfile)) {
$options['options']['x_tls_cacertdir'] = $cacertdir;
$options['options']['x_tls_cacertfile'] = $cacertfile;
}
Original file line number Diff line number Diff line change
@@ -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='
27 changes: 25 additions & 2 deletions plugins/content/emailcloak/src/Extension/EmailCloak.php
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
namespace Joomla\Plugin\Content\EmailCloak\Extension;

use Joomla\CMS\Event\Content\ContentPrepareEvent;
use Joomla\CMS\Event\CustomFields\AfterPrepareFieldEvent;
use Joomla\CMS\Event\Finder\ResultEvent;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Plugin\CMSPlugin;
@@ -38,8 +39,9 @@ final class EmailCloak extends CMSPlugin implements SubscriberInterface
public static function getSubscribedEvents(): array
{
return [
'onContentPrepare' => 'onContentPrepare',
'onFinderResult' => 'onFinderResult',
'onContentPrepare' => 'onContentPrepare',
'onFinderResult' => 'onFinderResult',
'onCustomFieldsAfterPrepareField' => 'onCustomFieldsAfterPrepareField',
];
}

@@ -96,6 +98,27 @@ public function onContentPrepare(ContentPrepareEvent $event)
}
}

/**
* Plugin that cloaks all emails in a custom field.
*
* @param AfterPrepareFieldEvent $event Event instance
*
* @return void
*/
public function onCustomFieldsAfterPrepareField(AfterPrepareFieldEvent $event)
{
// If the value is empty then there is nothing to do
if (empty($event->getValue())) {
return;
}

$text = $this->cloak($event->getValue());

if ($text) {
$event->updateValue($text);
}
}

/**
* Generate a search pattern based on link and text.
*
Original file line number Diff line number Diff line change
@@ -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();
8 changes: 4 additions & 4 deletions plugins/editors/tinymce/src/PluginTraits/XTDButtons.php
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ private function tinyButtons($buttons, array $options = []): array
if ($link && $link[0] !== '#') {
$link = str_contains($link, '&amp;') ? htmlspecialchars_decode($link) : $link;
$link = Uri::base(true) . '/' . $link;
$options['src'] = $options['src'] ?? $link;
$options['src'] ??= $link;
}

// Set action to "modal" for legacy buttons, when possible
@@ -85,9 +85,9 @@ private function tinyButtons($buttons, array $options = []): array
$wa->useScript('joomla.dialog');
$legacyModal = false;

$options['popupType'] = $options['popupType'] ?? 'iframe';
$options['textHeader'] = $options['textHeader'] ?? $title;
$options['iconHeader'] = $options['iconHeader'] ?? 'icon-' . $icon;
$options['popupType'] ??= 'iframe';
$options['textHeader'] ??= $title;
$options['iconHeader'] ??= 'icon-' . $icon;
}

$coreButton = [];
2 changes: 1 addition & 1 deletion plugins/extension/finder/src/Extension/Finder.php
Original file line number Diff line number Diff line change
@@ -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
}
}
18 changes: 9 additions & 9 deletions plugins/filesystem/local/src/Adapter/LocalAdapter.php
Original file line number Diff line number Diff line change
@@ -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'])) {
@@ -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'])) {
@@ -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
}
}
@@ -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'));
}
}
@@ -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'));
}

@@ -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'));
}
}
@@ -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'));
}

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

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

if (!$can) {
@@ -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;
}

2 changes: 1 addition & 1 deletion plugins/installer/override/src/Extension/Override.php
Original file line number Diff line number Diff line change
@@ -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 [];
}

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

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

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

@@ -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);
4 changes: 2 additions & 2 deletions plugins/multifactorauth/webauthn/src/Helper/Credentials.php
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ public static function verifyAttestation(string $data): ?PublicKeyCredentialSour

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

@@ -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';
}

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

@@ -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;
}
12 changes: 6 additions & 6 deletions plugins/sampledata/multilang/src/Extension/MultiLanguage.php
Original file line number Diff line number Diff line change
@@ -527,7 +527,7 @@ private function enablePlugin($pluginName)

try {
$db->execute();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
return false;
}

@@ -553,7 +553,7 @@ private function enablePlugin($pluginName)

try {
$db->execute();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
return false;
}
}
@@ -590,7 +590,7 @@ private function disableModuleMainMenu()

try {
$db->execute();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
return false;
}

@@ -922,7 +922,7 @@ private function addAssociations($groupedAssociations)

try {
$db->execute();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
return false;
}
}
@@ -956,7 +956,7 @@ private function addModuleInModuleMenu($moduleId)

try {
$db->execute();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
return false;
}

@@ -1132,7 +1132,7 @@ private function addArticle($itemLanguage, $categoryId)
if ($stage_id) {
$workflow->createAssociation($newId, $stage_id);
}
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
return false;
}

2 changes: 1 addition & 1 deletion plugins/schemaorg/custom/src/Extension/Custom.php
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ public function onSchemaPrepareSave(PrepareSaveEvent $event): void
$schema = new Registry($subject->schema);

$json = (new Registry($schema->get('json')))->toArray();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
$this->getApplication()->enqueueMessage(Text::_('PLG_SCHEMAORG_CUSTOM_JSON_ERROR'), 'error');
return;
}
10 changes: 5 additions & 5 deletions plugins/system/actionlogs/src/Extension/ActionLogs.php
Original file line number Diff line number Diff line change
@@ -182,7 +182,7 @@ public function onContentPrepareData(Model\PrepareDataEvent $event): void

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

@@ -292,7 +292,7 @@ public function onUserAfterSave(User\AfterSaveEvent $event): void

try {
$db->setQuery($query)->execute();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
// Do nothing.
}
}
@@ -325,7 +325,7 @@ public function onUserAfterDelete(User\AfterDeleteEvent $event): void

try {
$db->setQuery($query)->execute();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
// Do nothing.
}
}
@@ -399,7 +399,7 @@ public function onExtensionAfterSave(Model\AfterSaveEvent $event): void

try {
$values = $db->setQuery($query)->loadObjectList();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
return;
}

@@ -420,7 +420,7 @@ public function onExtensionAfterSave(Model\AfterSaveEvent $event): void

try {
$db->setQuery($query)->execute();
} catch (ExecutionFailureException $e) {
} catch (ExecutionFailureException) {
// Do nothing.
}
}
Original file line number Diff line number Diff line change
@@ -263,7 +263,7 @@ public function setRequestEndTime($time): self
*/
public function collect(): array
{
$this->requestEndTime = $this->requestEndTime ?? microtime(true);
$this->requestEndTime ??= microtime(true);

$start = $this->requestStartTime;

6 changes: 3 additions & 3 deletions plugins/system/debug/src/JavascriptRenderer.php
Original file line number Diff line number Diff line change
@@ -55,9 +55,9 @@ public function __construct(DebugBar $debugBar, $baseUrl = null, $basePath = nul
*/
public function renderHead()
{
list($cssFiles, $jsFiles, $inlineCss, $inlineJs, $inlineHead) = $this->getAssets(null, self::RELATIVE_URL);
$html = '';
$doc = Factory::getApplication()->getDocument();
[$cssFiles, $jsFiles, $inlineCss, $inlineJs, $inlineHead] = $this->getAssets(null, self::RELATIVE_URL);
$html = '';
$doc = Factory::getApplication()->getDocument();

foreach ($cssFiles as $file) {
$html .= \sprintf('<link rel="stylesheet" type="text/css" href="%s">' . "\n", $file);
2 changes: 1 addition & 1 deletion plugins/system/guidedtours/src/Extension/GuidedTours.php
Original file line number Diff line number Diff line change
@@ -214,7 +214,7 @@ public function onBeforeCompileHead()

try {
$result = $db->setQuery($query)->loadResult();
} catch (\Exception $e) {
} catch (\Exception) {
// Do not start the tour.
continue;
}
Original file line number Diff line number Diff line change
@@ -160,8 +160,7 @@ public function __construct(

foreach ($this->sefs as $sef => $language) {
if (!\array_key_exists($language->lang_code, LanguageHelper::getInstalledLanguages(0))) {
unset($this->lang_codes[$language->lang_code]);
unset($this->sefs[$language->sef]);
unset($this->lang_codes[$language->lang_code], $this->sefs[$language->sef]);
}
}
}
@@ -514,7 +513,7 @@ public function parseRule(&$router, &$uri)
$language_new = $this->languageFactory->createLanguage($lang_code, (bool) $app->get('debug_lang'));

foreach ($language->getPaths() as $extension => $files) {
if (str_contains($extension, 'plg_system')) {
if (str_starts_with($extension, 'plg_system')) {
$extension_name = substr($extension, 11);

$language_new->load($extension, JPATH_ADMINISTRATOR)
2 changes: 1 addition & 1 deletion plugins/system/log/src/Extension/Log.php
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ public function onUserLoginFailure(LoginFailureEvent $event): void

try {
Logger::add($errorlog['comment'], Logger::INFO, $errorlog['status']);
} catch (\Exception $e) {
} catch (\Exception) {
// If the log file is unwriteable during login then we should not go to the error page
return;
}
Original file line number Diff line number Diff line change
@@ -200,7 +200,7 @@ public function onUserAfterSave(User\AfterSaveEvent $event): void

try {
$this->getDatabase()->insertObject('#__privacy_consents', $userNote);
} catch (\Exception $e) {
} catch (\Exception) {
// Do nothing if the save fails
}

2 changes: 1 addition & 1 deletion plugins/system/redirect/src/Extension/Redirect.php
Original file line number Diff line number Diff line change
@@ -214,7 +214,7 @@ public function handleError(ErrorEvent $event)

try {
$this->getDatabase()->updateObject('#__redirect_links', $redirect, 'id');
} catch (\Exception $e) {
} catch (\Exception) {
// We don't log issues for now
}

Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ public function runLazyCron(EventInterface $e)
// Suppress all errors to avoid any output
try {
$this->runScheduler();
} catch (\Exception $e) {
} catch (\Exception) {
}

ob_end_clean();
10 changes: 5 additions & 5 deletions plugins/system/stats/src/Extension/Stats.php
Original file line number Diff line number Diff line change
@@ -498,7 +498,7 @@ private function saveParams()
$result = $db->setQuery($query)->execute();

$this->clearCacheGroups(['com_plugins']);
} catch (\Exception $exc) {
} catch (\Exception) {
// If we failed to execute
$db->unlockTables();
$result = false;
@@ -507,7 +507,7 @@ private function saveParams()
try {
// Unlock the tables after writing
$db->unlockTables();
} catch (\Exception $e) {
} catch (\Exception) {
// If we can't lock the tables assume we have somehow failed
$result = false;
}
@@ -585,7 +585,7 @@ private function clearCacheGroups(array $clearGroups)

$cache = Cache::getInstance('callback', $options);
$cache->clean();
} catch (\Exception $e) {
} catch (\Exception) {
// Ignore it
}
}
@@ -623,7 +623,7 @@ private function disablePlugin()
$result = $db->setQuery($query)->execute();

$this->clearCacheGroups(['com_plugins']);
} catch (\Exception $exc) {
} catch (\Exception) {
// If we failed to execute
$db->unlockTables();
$result = false;
@@ -632,7 +632,7 @@ private function disablePlugin()
try {
// Unlock the tables after writing
$db->unlockTables();
} catch (\Exception $e) {
} catch (\Exception) {
// If we can't lock the tables assume we have somehow failed
$result = false;
}
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ public function injectTaskNotificationFieldset(Model\PrepareFormEvent $event): b

try {
$formFile = Path::check($formFile);
} catch (\Exception $e) {
} catch (\Exception) {
// Log?
return false;
}
@@ -290,7 +290,7 @@ private function sendMail(string $template, array $data, string $attachment = ''

try {
$users = $db->loadObjectList();
} catch (\RuntimeException $e) {
} catch (\RuntimeException) {
return;
}

@@ -323,7 +323,7 @@ private function sendMail(string $template, array $data, string $attachment = ''

$mailer->send();
$mailSent = true;
} catch (MailerException $exception) {
} catch (MailerException) {
Log::add($this->getApplication()->getLanguage()->_('PLG_SYSTEM_TASK_NOTIFICATION_NOTIFY_SEND_EMAIL_FAIL'), Log::ERROR);
}
}
6 changes: 3 additions & 3 deletions plugins/system/webauthn/src/Authentication.php
Original file line number Diff line number Diff line change
@@ -308,7 +308,7 @@ public function validateAttestationResponse(string $data): PublicKeyCredentialSo
/** @var PublicKeyCredentialCreationOptions|null $publicKeyCredentialCreationOptions */
try {
$publicKeyCredentialCreationOptions = unserialize(base64_decode($encodedOptions));
} catch (\Exception $e) {
} catch (\Exception) {
Log::add('The plg_system_webauthn.publicKeyCredentialCreationOptions in the session is invalid', Log::NOTICE, 'webauthn.system');
$publicKeyCredentialCreationOptions = null;
}
@@ -392,7 +392,7 @@ private function getSiteIcon(): ?string
'/templates/',
'/templates/' . $this->app->getTemplate(),
];
} catch (\Exception $e) {
} catch (\Exception) {
return null;
}

@@ -502,7 +502,7 @@ private function getPKCredentialRequestOptions(): PublicKeyCredentialRequestOpti

try {
$publicKeyCredentialRequestOptions = unserialize(base64_decode($encodedOptions));
} catch (\Exception $e) {
} catch (\Exception) {
Log::add('Invalid plg_system_webauthn.publicKeyCredentialRequestOptions in the session', Log::NOTICE, 'webauthn.system');

throw new \RuntimeException(Text::_('PLG_SYSTEM_WEBAUTHN_ERR_CREATE_INVALID_LOGIN_REQUEST'));
20 changes: 10 additions & 10 deletions plugins/system/webauthn/src/CredentialRepository.php
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ public function findOneByCredentialId(string $publicKeyCredentialId): ?PublicKey

try {
return PublicKeyCredentialSource::createFromArray(json_decode($json, true));
} catch (\Throwable $e) {
} catch (\Throwable) {
return null;
}
}
@@ -136,7 +136,7 @@ public function findAllForUserEntity(PublicKeyCredentialUserEntity $publicKeyCre

try {
return PublicKeyCredentialSource::createFromArray($data);
} catch (\InvalidArgumentException $e) {
} catch (\InvalidArgumentException) {
return null;
}
};
@@ -222,7 +222,7 @@ public function saveCredentialSource(PublicKeyCredentialSource $publicKeyCredent
$o->user_id = $oldRecord->user_id;
$o->label = $oldRecord->label;
$update = true;
} catch (\Exception $e) {
} catch (\Exception) {
}

$o->credential = $this->encryptCredential($o->credential);
@@ -304,7 +304,7 @@ public function getAll(int $userId): array
$record['credential'] = PublicKeyCredentialSource::createFromArray($data);

return $record;
} catch (\InvalidArgumentException $e) {
} catch (\InvalidArgumentException) {
$record['credential'] = null;

return $record;
@@ -338,7 +338,7 @@ public function has(string $credentialId): bool
$count = $db->setQuery($query)->loadResult();

return $count > 0;
} catch (\Exception $e) {
} catch (\Exception) {
return false;
}
}
@@ -473,7 +473,7 @@ public function getUserIdFromHandle(?string $userHandle): ?int

try {
$numRecords = $db->setQuery($query)->loadResult();
} catch (\Exception $e) {
} catch (\Exception) {
return null;
}

@@ -501,7 +501,7 @@ public function getUserIdFromHandle(?string $userHandle): ?int
while (true) {
try {
$ids = $db->setQuery($query, $start, $limit)->loadColumn();
} catch (\Exception $e) {
} catch (\Exception) {
return null;
}

@@ -585,7 +585,7 @@ private function getEncryptionKey(): string
/** @var Registry $config */
$config = $app->getConfig();
$secret = $config->get('secret', '');
} catch (\Exception $e) {
} catch (\Exception) {
$secret = '';
}

@@ -621,7 +621,7 @@ private function formatDate($date, ?string $format = null, bool $tzAware = true)

try {
$tzDefault = Factory::getApplication()->get('offset');
} catch (\Exception $e) {
} catch (\Exception) {
$tzDefault = 'GMT';
}

@@ -634,7 +634,7 @@ private function formatDate($date, ?string $format = null, bool $tzAware = true)
$userTimeZone = new \DateTimeZone($tz);

$jDate->setTimezone($userTimeZone);
} catch (\Exception $e) {
} catch (\Exception) {
// Nothing. Fall back to UTC.
}
}
Loading

0 comments on commit 362ec5e

Please sign in to comment.