summaryrefslogtreecommitdiff
path: root/cli/_cli.php
diff options
context:
space:
mode:
Diffstat (limited to 'cli/_cli.php')
-rwxr-xr-xcli/_cli.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/_cli.php b/cli/_cli.php
index 9486405aa..b4df51dd8 100755
--- a/cli/_cli.php
+++ b/cli/_cli.php
@@ -52,7 +52,8 @@ function accessRights(): void {
function done(bool $ok = true): never {
if (!$ok) {
- fwrite(STDERR, (empty($_SERVER['argv'][0]) ? 'Process' : basename($_SERVER['argv'][0])) . ' failed!' . "\n");
+ fwrite(STDERR, (isset($_SERVER['argv']) && is_array($_SERVER['argv']) && !empty($_SERVER['argv'][0]) && is_string($_SERVER['argv'][0]) ?
+ basename($_SERVER['argv'][0]) : 'Process') . ' failed!' . "\n");
}
exit($ok ? 0 : 1);
}