php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch E_NONE for Scripting Engine problem Bug #52563Patch version 2010-08-09 10:46 UTC Return to Bug #52563 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: aharvey@php.netIndex: Zend/zend_constants.c =================================================================== --- Zend/zend_constants.c (revision 302013) +++ Zend/zend_constants.c (working copy) @@ -97,6 +97,7 @@ 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_RECOVERABLE_ERROR", E_RECOVERABLE_ERROR, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT | CONST_CS); Index: Zend/zend_errors.h =================================================================== --- Zend/zend_errors.h (revision 302013) +++ Zend/zend_errors.h (working copy) @@ -22,6 +22,7 @@ #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) Index: Zend/tests/bug52563.phpt =================================================================== --- Zend/tests/bug52563.phpt (revision 0) +++ Zend/tests/bug52563.phpt (revision 0) @@ -0,0 +1,18 @@ +--TEST-- +Bug #52563 (error_reporting constant) +--FILE-- +<?php +var_dump(defined('E_NONE')); +var_dump(E_NONE); + +error_reporting(E_ALL); +trigger_error('Test error', E_USER_WARNING); + +error_reporting(E_NONE); +trigger_error('Test error', E_USER_WARNING); +?> +--EXPECTF-- +bool(true) +int(0) + +Warning: Test error in %s on line %d |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Sun Nov 24 03:01:32 2024 UTC |