Skip to content

Commit f50ea28

Browse files
bramleymarianaballa
authored andcommitted
Avoid php undefined index notice when parsing command line parameters.
1 parent c3c7d26 commit f50ea28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

public_html/lists/admin/index.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ function mb_strtolower($string)
540540
if ($updateNotif !== '') {
541541
Info($updateNotif . '' . $moreInfo);
542542
}
543-
543+
544544
# }
545545

546546
if (version_compare(PHP_VERSION, '5.3.3', '<') && WARN_ABOUT_PHP_SETTINGS) {
@@ -854,6 +854,9 @@ function parseCline()
854854
$clinearg = substr($clinearg, 2, strlen($clinearg));
855855
// $res[$par] = "";
856856
$cur = mb_strtolower($par);
857+
if (!isset($res[$cur])) {
858+
$res[$cur] = '';
859+
}
857860
$res[$cur] .= $clinearg;
858861
} elseif ($cur) {
859862
if ($res[$cur]) {

0 commit comments

Comments
 (0)