Skip to content

Commit 342e78c

Browse files
authored
Fixed error when calling shell script from browser (#2674)
1 parent 89ee72c commit 342e78c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shell/abstract.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ protected function _applyPhpVariables()
135135
*/
136136
protected function _parseArgs()
137137
{
138+
if (empty($_SERVER['argv'])) {
139+
return $this;
140+
}
141+
138142
$current = null;
139143
foreach ($_SERVER['argv'] as $arg) {
140144
$match = [];

0 commit comments

Comments
 (0)