Skip to content

Commit

Permalink
FIX avoid warning : Cannot use a scalar value as an array (#26437)
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis authored Nov 7, 2023
1 parent b5e5b1d commit 56e9df9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion htdocs/core/class/html.formadmin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,15 @@ public function __construct($db)
* @param int $mainlangonly 1=Show only main languages ('fr_FR' no' fr_BE', 'es_ES' not 'es_MX', ...)
* @return string Return HTML select string with list of languages
*/
public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = null, $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0, $multiselect = 0, $onlykeys = null, $mainlangonly = 0)
public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = array(), $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0, $multiselect = 0, $onlykeys = array(), $mainlangonly = 0)
{
// phpcs:enable
global $conf, $langs;

if (!empty($conf->global->MAIN_DEFAULT_LANGUAGE_FILTER)) {
if (!is_array($filter)) {
$filter = array();
}
$filter[$conf->global->MAIN_DEFAULT_LANGUAGE_FILTER] = 1;
}

Expand Down

0 comments on commit 56e9df9

Please sign in to comment.