Skip to content

Commit 68b0548

Browse files
authored
[5.3] Fix PHP deprecation warning in mod_languages (joomla#45262)
* Fix PHP deprecation in mod_languages * Fix PHP deprecation in mod_languages
1 parent 8880115 commit 68b0548

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/mod_languages/src/Helper/LanguagesHelper.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@ public function getLanguages(&$params)
6262
}
6363

6464
// Load associations
65-
$assoc = Associations::isEnabled();
65+
$assoc = Associations::isEnabled();
66+
$option = $app->getInput()->get('option');
67+
$associations = [];
6668

67-
if ($assoc) {
69+
if ($assoc && $option) {
6870
if ($active) {
6971
$associations = MenusHelper::getAssociations($active->id);
7072
}
7173

72-
$option = $app->getInput()->get('option');
7374
$component = $app->bootComponent($option);
7475

7576
if ($component instanceof AssociationServiceInterface) {

0 commit comments

Comments
 (0)