No Code Attached Yet
avatar phunsoft
phunsoft
3 Feb 2022

What needs to be fixed

At the beginning of file layouts\joomla\content\emptystate.php, some variables are initialized. Variables $title and $content are initialised twice. See below. Although this doesn't have any impact, it should be fixed.

$formURL = $displayData['formURL'] ?? '';
$createURL = $displayData['createURL'] ?? '';
$helpURL = $displayData['helpURL'] ?? '';
$title = $displayData['title'] ?? Text::_($textPrefix . 'EMPTYSTATE_TITLE'); <<<==========
$content = $displayData['content'] ?? Text::
($textPrefix . 'EMPTYSTATE_CONTENT'); <<<==========
$icon = $displayData['icon'] ?? 'icon-copy article';
$append = $displayData['formAppend'] ?? '';
$title = $displayData['title'] ?? Text::
($textPrefix . 'EMPTYSTATE_TITLE'); <<<==========
$content = $displayData['content'] ?? Text::
($textPrefix . '_EMPTYSTATE_CONTENT'); <<<==========
$btnadd = $displayDat

Why this should be fixed

Initialise any variable only once.

How would you fix it

Delete the second initialisations

Side Effects expected

None.

avatar phunsoft phunsoft - open - 3 Feb 2022
avatar joomla-cms-bot joomla-cms-bot - change - 3 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Feb 2022
avatar Quy
Quy - comment - 4 Feb 2022

Please test #36937. Thanks.

avatar Quy Quy - change - 4 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-04 01:42:37
Closed_By Quy
avatar Quy Quy - close - 4 Feb 2022

Add a Comment

Login with GitHub to post a comment