r50505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50504‎ | r50505 | r50506 >
Date:06:15, 12 May 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Fix for PHP 5.3: error_handling global moved from PG() to EG().
Modified paths:
  • /trunk/php/wmerrors/wmerrors.c (modified) (history)

Diff [purge]

Index: trunk/php/wmerrors/wmerrors.c
@@ -97,16 +97,19 @@
9898 DISPLAY_INI_ENTRIES();
9999 }
100100
 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
101107
102 -
103 -
104 -
105108 void wmerrors_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
106109 {
107110 TSRMLS_FETCH();
108111
109112 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))
111114 || (type != E_ERROR && type != E_CORE_ERROR && type != E_COMPILE_ERROR
112115 && type != E_USER_ERROR && type != E_RECOVERABLE_ERROR)
113116 || strncmp(sapi_module.name, "apache", 6)

Status & tagging log