mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Fixed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
15f9c6af67
commit
2992ca1fa2
|
@ -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