summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-03-05 13:45:32 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-03-05 13:45:32 +0000
commitd81acb44036ec7109cb8d27ff9a734dfac6d92c6 (patch)
tree75ba957fbef235b91ba47738792caa958e51f038
parentc541732ae1e33246dbab8fd24521e3b84b1b75d2 (diff)
downloadphp-git-d81acb44036ec7109cb8d27ff9a734dfac6d92c6.tar.gz
Removed bogus code
-rw-r--r--Zend/zend_builtin_functions.c34
1 files changed, 0 insertions, 34 deletions
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;
}