summaryrefslogtreecommitdiff
path: root/Zend/zend_constants.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-11-13 19:50:55 +0000
committerFelipe Pena <felipe@php.net>2010-11-13 19:50:55 +0000
commitc95e919e3e815b77adea9e565a84f2d38c5b0242 (patch)
tree78c9eb7cd20758be7af65f53ae66c46c678cf57e /Zend/zend_constants.c
parentb5b059939814275ea389c04c61423a21a01c0d69 (diff)
downloadphp-git-c95e919e3e815b77adea9e565a84f2d38c5b0242.tar.gz
- Fix the constant detection
Diffstat (limited to 'Zend/zend_constants.c')
-rw-r--r--Zend/zend_constants.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index b566146af0..22b31fec87 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -479,7 +479,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);