Skip to content

Commit

Permalink
Avoid php undefined index notice when parsing command line parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
bramley authored and marianaballa committed Dec 14, 2020
1 parent c3c7d26 commit f50ea28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion public_html/lists/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ function mb_strtolower($string)
if ($updateNotif !== '') {
Info($updateNotif . '' . $moreInfo);
}

# }

if (version_compare(PHP_VERSION, '5.3.3', '<') && WARN_ABOUT_PHP_SETTINGS) {
Expand Down Expand Up @@ -854,6 +854,9 @@ function parseCline()
$clinearg = substr($clinearg, 2, strlen($clinearg));
// $res[$par] = "";
$cur = mb_strtolower($par);
if (!isset($res[$cur])) {
$res[$cur] = '';
}
$res[$cur] .= $clinearg;
} elseif ($cur) {
if ($res[$cur]) {
Expand Down

0 comments on commit f50ea28

Please sign in to comment.