mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fixed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
b10ea0c25c
commit
ec2afee57d
|
@ -449,11 +449,11 @@ echo "--------------------------------------------------------\n\n";
|
|||
|
||||
|
||||
function str_begins($haystack, $needle) {
|
||||
return 0 === substr_compare($haystack, $needle, 0, strlen($needle));
|
||||
return (substr_compare($haystack, $needle, 0, strlen($needle)) === 0);
|
||||
}
|
||||
|
||||
function str_ends($haystack, $needle) {
|
||||
return 0 === substr_compare($haystack, $needle, -strlen($needle));
|
||||
return (substr_compare($haystack, $needle, -strlen($needle)) === 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue