From a0ccf0f14a630f9e806e8fbcae0d0dce875aac81 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 13 Nov 2010 19:50:55 +0000 Subject: [PATCH] - Fix the constant detection --- Zend/zend_constants.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index bae13eaf02..0d190b269a 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -440,7 +440,7 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC) || zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) { /* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */ - if (strncmp(name+1, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")) == 0) { + if (memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) { name++; } zend_error(E_NOTICE,"Constant %s already defined", name); -- 2.40.0