From: Ilia Alshanetsky Date: Thu, 5 Mar 2009 13:45:32 +0000 (+0000) Subject: Removed bogus code X-Git-Tag: php-5.4.0alpha1~191^2~4197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d81acb44036ec7109cb8d27ff9a734dfac6d92c6;p=php Removed bogus code --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 354fc9c6c8..83adda9924 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -627,40 +627,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; }