From a342138e17d5921d4477c24f416c1b2ff08ffeb5 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 5 Jul 2023 18:13:04 +0100 Subject: [PATCH] Revert "Use binary safe case compare in new zend_string API" This reverts commit eb5cc1372cf8c6ffda987cc7bc847ed3d9276af9. A) I'm using the function incorectly B) Somehow the function is undefined although it's used in other zend_string APIs --- Zend/zend_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 0eb08bd47ff..1513a19c360 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -413,7 +413,7 @@ static zend_always_inline bool zend_string_starts_with(const zend_string *str, c static zend_always_inline bool zend_string_starts_with_cstr_ci(const zend_string *str, const char *prefix, size_t prefix_length) { - return ZSTR_LEN(str) >= prefix_length && !zend_binary_strcasecmp(ZSTR_VAL(str), prefix, prefix_length); + return ZSTR_LEN(str) >= prefix_length && !strncasecmp(ZSTR_VAL(str), prefix, prefix_length); } static zend_always_inline bool zend_string_starts_with_ci(const zend_string *str, const zend_string *prefix)