No need to test twice if the array is empty or not :-p

This commit is contained in:
franck 2024-12-09 11:32:13 +01:00
parent b2be008dd1
commit 20bab77742
No known key found for this signature in database
GPG key ID: BC0939B7E6CF71E7
2 changed files with 2 additions and 2 deletions

View file

@ -260,7 +260,7 @@ class BlogTheme extends Process
App::behavior()->callBehavior('afterCheckStoreUpdate', 'themes', $tmp);
$defines = $tmp->getArrayCopy();
$updates = !empty($defines) && count($defines) > 0 ? sprintf(' (%s)', count($defines)) : '';
$updates = !empty($defines) ? sprintf(' (%s)', count($defines)) : '';
$list = fn () => App::backend()->list
->setList('theme-update')

View file

@ -210,7 +210,7 @@ class Plugins extends Process
App::behavior()->callBehavior('afterCheckStoreUpdate', 'plugins', $tmp);
$defines = $tmp->getArrayCopy();
$updates = !empty($defines) && count($defines) > 0 ? sprintf(' (%s)', count($defines)) : '';
$updates = !empty($defines) ? sprintf(' (%s)', count($defines)) : '';
echo
'<div class="multi-part" id="update" title="' . Html::escapeHTML(__('Update plugins')) . $updates . '">' .