Skip to content

Commit c95e919

Browse files
committed
- Fix the constant detection
1 parent b5b0599 commit c95e919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Zend/zend_constants.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
479479
|| zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
480480

481481
/* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */
482-
if (strncmp(name+1, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")) == 0) {
482+
if (memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) {
483483
name++;
484484
}
485485
zend_error(E_NOTICE,"Constant %s already defined", name);

0 commit comments

Comments
 (0)