Skip to content

Commit d4750b7

Browse files
authored
suppress warning
Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated
1 parent 36a124c commit d4750b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cli/arguments/Argument.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function raw() {
7777
* @return bool
7878
*/
7979
public function isLong() {
80-
return (0 == strncmp($this->_raw, '--', 2));
80+
return (0 == strncmp((string)$this->_raw, '--', 2));
8181
}
8282

8383
/**
@@ -86,7 +86,7 @@ public function isLong() {
8686
* @return bool
8787
*/
8888
public function isShort() {
89-
return !$this->isLong && (0 == strncmp($this->_raw, '-', 1));
89+
return !$this->isLong && (0 == strncmp((string)$this->_raw, '-', 1));
9090
}
9191

9292
/**

0 commit comments

Comments
 (0)