diff --git a/access-functions.php b/access-functions.php index e4de7f40..d86529e7 100644 --- a/access-functions.php +++ b/access-functions.php @@ -37,8 +37,8 @@ function str_starts_with( $haystack, $needle ) { */ function str_ends_with( $haystack, $needle ) { $length = strlen( $needle ); - return $length === 0 - || $length - 1 === strpos( $haystack, $needle, - $length ); + return 0 === $length + || strpos( $haystack, $needle, - $length ) === $length - 1; } }//end if