From: [EMAIL PROTECTED]
Operating system: linux
PHP version: 4.1.2
PHP Bug Type: Feature/Change Request
Bug description: There is no E_NONE constant. Patch included.
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 bug report at http://bugs.php.net/?id=16330&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16330&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16330&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16330&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16330&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16330&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16330&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16330&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16330&r=submittedtwice