Skip to content

Commit fe93e26

Browse files
committed
main/php_variables: use zend_string_equals_literal()
1 parent 43a6cea commit fe93e26

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

main/php_variables.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,7 @@ static void php_autoglobal_merge(HashTable *dest, HashTable *src)
702702
|| Z_TYPE_P(dest_entry) != IS_ARRAY) {
703703
Z_TRY_ADDREF_P(src_entry);
704704
if (string_key) {
705-
if (!globals_check || ZSTR_LEN(string_key) != sizeof("GLOBALS") - 1
706-
|| memcmp(ZSTR_VAL(string_key), "GLOBALS", sizeof("GLOBALS") - 1)) {
705+
if (!globals_check || !zend_string_equals_literal(string_key, "GLOBALS")) {
707706
zend_hash_update(dest, string_key, src_entry);
708707
} else {
709708
Z_TRY_DELREF_P(src_entry);

0 commit comments

Comments
 (0)