mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -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) {
|
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) {
|
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