diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2008-10-22 23:28:34 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2008-10-22 23:28:34 +0000 |
commit | 8a106deb247ee44112d75a2c797b0b02e106299e (patch) | |
tree | 0740697506f2f419ff8b173fb883a5d8d2bb8163 /Zend/zend_builtin_functions.c | |
parent | 5c50be36748d73d24c4ba51c10db840300565224 (diff) | |
download | php-git-8a106deb247ee44112d75a2c797b0b02e106299e.tar.gz |
Revert define() fix, it needs further review
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r-- | Zend/zend_builtin_functions.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index b9c42b4787..0e3dba8418 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -26,7 +26,6 @@ #include "zend_ini.h" #include "zend_exceptions.h" #include "zend_extensions.h" -#include <ctype.h> #undef ZEND_TEST_EXCEPTIONS @@ -718,7 +717,7 @@ ZEND_FUNCTION(error_reporting) Define a new constant */ ZEND_FUNCTION(define) { - char *name, *p; + char *name; int name_len; zval *val; zval *val_free = NULL; @@ -730,40 +729,6 @@ ZEND_FUNCTION(define) return; } - /* check if class constant */ - if ((p = memchr(name, ':', name_len))) { - char *s = name; - zend_class_entry **ce; - - if (*(p + 1) != ':') { /* invalid constant specifier */ - RETURN_FALSE; - } else if ((p + 2) >= (name + name_len)) { /* constant name length < 1 */ - zend_error(E_WARNING, "Constants name cannot be empty"); - RETURN_FALSE; - } else if (zend_lookup_class(s, (p - s), &ce TSRMLS_CC) != SUCCESS) { /* invalid class name */ - zend_error(E_WARNING, "Class does not exists"); - RETURN_FALSE; - } else { /* check of constant name contains invalid chars */ - int ok = 1; - p += 2; /* move beyond :: to 1st char of constant's name */ - - if (!isalpha(*p) && *p != '_') { - ok = 0; - } - - while (ok && *++p) { - if (!isalnum(*p) && *p != '_') { - ok = 0; - break; - } - } - - if (!ok) { - RETURN_FALSE; - } - } - } - if(non_cs) { case_sensitive = 0; } |