Index: trunk/php/wmerrors/wmerrors.c |
— | — | @@ -97,16 +97,19 @@ |
98 | 98 | DISPLAY_INI_ENTRIES(); |
99 | 99 | } |
100 | 100 | |
| 101 | +/* error_handling moved in March 2008 on the PHP 5.3 branch */ |
| 102 | +#if ZEND_MODULE_API_NO >= 20090115 |
| 103 | +#define WM_ERROR_HANDLING EG(error_handling) |
| 104 | +#else |
| 105 | +#define WM_ERROR_HANDLING PG(error_handling) |
| 106 | +#endif |
101 | 107 | |
102 | | - |
103 | | - |
104 | | - |
105 | 108 | void wmerrors_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) |
106 | 109 | { |
107 | 110 | TSRMLS_FETCH(); |
108 | 111 | |
109 | 112 | if ( !WMERRORS_G(enabled) |
110 | | - || (type == E_RECOVERABLE_ERROR && PG(error_handling) == EH_THROW && !EG(exception)) |
| 113 | + || (type == E_RECOVERABLE_ERROR && WM_ERROR_HANDLING == EH_THROW && !EG(exception)) |
111 | 114 | || (type != E_ERROR && type != E_CORE_ERROR && type != E_COMPILE_ERROR |
112 | 115 | && type != E_USER_ERROR && type != E_RECOVERABLE_ERROR) |
113 | 116 | || strncmp(sapi_module.name, "apache", 6) |