ID: 16330
Comment by: jevon at jevon dot org
Reported By: dshadow at zort dot net
Status: Open
Bug Type: Feature/Change Request
Operating System: linux
PHP Version: 4.1.2
New Comment:
This makes no sense. Why have E_NONE when using '0' is simpler? I don't
see how it would be helpful at all, especially since 0 is not a
combination of any other numbers.
Previous Comments:
------------------------------------------------------------------------
[2002-03-28 10:43:36] dshadow at zort dot net
While investigating bug 16004, I noticed there is no E_NONE error
constant. The folowing patch provides one. (Apologies if this is
mangled, but I don't see another way to submit patches...)
diff -ur php-4.1.2/Zend/zend_constants.c
php-4.1.2-enone/Zend/zend_constants.c
--- php-4.1.2/Zend/zend_constants.c Mon Dec 17 00:22:24 2001
+++ php-4.1.2-enone/Zend/zend_constants.c Thu Mar 28 10:32:06 2002
@@ -102,6 +102,8 @@
void zend_register_standard_constants(TSRMLS_D)
{
+ REGISTER_MAIN_LONG_CONSTANT("E_NONE", E_NONE, CONST_PERSISTENT |
CONST_CS);
+
REGISTER_MAIN_LONG_CONSTANT("E_ERROR", E_ERROR, CONST_PERSISTENT |
CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT
| CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT |
CONST_CS);
diff -ur php-4.1.2/Zend/zend_errors.h
php-4.1.2-enone/Zend/zend_errors.h
--- php-4.1.2/Zend/zend_errors.h Mon Dec 17 00:22:24 2001
+++ php-4.1.2-enone/Zend/zend_errors.h Thu Mar 28 10:31:41 2002
@@ -21,6 +21,8 @@
#ifndef ZEND_ERRORS_H
#define ZEND_ERRORS_H
+#define E_NONE (0)
+
#define E_ERROR (1<<0L)
#define E_WARNING (1<<1L)
#define E_PARSE (1<<2L)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16330&edit=1