Skip to content

Commit

Permalink
Use binary safe case compare in new zend_string API
Browse files Browse the repository at this point in the history
  • Loading branch information
Girgias committed Jul 5, 2023
1 parent ee22612 commit eb5cc13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Zend/zend_string.h
Expand Up @@ -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 && !strncasecmp(ZSTR_VAL(str), prefix, prefix_length);
return ZSTR_LEN(str) >= prefix_length && !zend_binary_strcasecmp(ZSTR_VAL(str), prefix, prefix_length);
}

static zend_always_inline bool zend_string_starts_with_ci(const zend_string *str, const zend_string *prefix)
Expand Down

0 comments on commit eb5cc13

Please sign in to comment.