This repository was archived by the owner on Jan 23, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,14 @@ class Input
33
33
* e.g `./bin/app` OR `bin/cli.php`
34
34
* @var string
35
35
*/
36
- public static $ scriptName ;
36
+ public static $ scriptName = '' ;
37
37
38
38
/**
39
39
* the script name
40
40
* e.g `image/packTask` OR `start`
41
41
* @var string
42
42
*/
43
- public static $ command ;
43
+ public static $ command = '' ;
44
44
45
45
public function __construct ($ parseArgv = true , $ fixServer = false , $ fillToGlobal = false )
46
46
{
@@ -128,10 +128,6 @@ public static function parseGlobalArgv($fixServer = false, $fillToGlobal = false
128
128
global $ argv ;
129
129
$ args = $ argv ;
130
130
131
- if ($ args [0 ] === 'php ' ) {
132
- array_shift ($ args );
133
- }
134
-
135
131
self ::$ scriptName = array_shift ($ args );
136
132
137
133
if ($ fixServer ) {
@@ -153,7 +149,7 @@ public static function parseGlobalArgv($fixServer = false, $fillToGlobal = false
153
149
}
154
150
155
151
// collect command
156
- if ( isset ($ args [0 ]) && strpos ($ args [0 ], '= ' ) === false ) {
152
+ if ( isset ($ args [0 ]) && $ args [ 0 ]{ 0 } !== ' - ' && strpos ($ args [0 ], '= ' ) === false ) {
157
153
self ::$ command = trim (array_shift ($ args ), '/ ' );
158
154
159
155
if ($ fixServer ) {
You can’t perform that action at this time.
0 commit comments