[xdebug-dev] xdebug xdebug/xdebug.c - Make this compile with PHP 5.3 and HEAD again. (Patch by Etienne Kneus)

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Thu, 13 Mar 2008 15:06:10 +0100

Date: Thu Mar 13 15:06:10 CET 2008
User: Derick Rethans
Directory: xdebug

Log Message:
[0.25]
- Make this compile with PHP 5.3 and HEAD again. (Patch by Etienne Kneus)

Modified files:
           xdebug/xdebug.c (version: 1.400.2.12)

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.400.2.11
retrieving revision 1.400.2.12
diff -u -r1.400.2.11 -r1.400.2.12
--- xdebug/xdebug.c:1.400.2.11 Wed Feb 13 15:27:07 2008 GMT
+++ xdebug/xdebug.c Thu Mar 13 13:06:10 2008 GMT
@@ -2222,6 +2222,10 @@
         char *buffer, *error_type_str;
         int buffer_len;
         xdebug_brk_info *extra_brk_info = NULL;
+#if PHP_MAJOR_VERSION >= 5
+ error_handling_t error_handling;
+ zend_class_entry *exception_class;
+#endif
 
         TSRMLS_FETCH();
 
@@ -2246,8 +2250,15 @@
 #endif
 
 #if PHP_MAJOR_VERSION >= 5
+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3) || PHP_MAJOR_VERSION >= 6
+ error_handling = EG(error_handling);
+ exception_class = EG(exception_class);
+#else
+ error_handling = PG(error_handling);
+ exception_class = PG(exception_class);
+#endif
         /* according to error handling mode, suppress error, throw exception or show it */
- if (PG(error_handling) != EH_NORMAL) {
+ if (error_handling != EH_NORMAL) {
                 switch (type) {
                         case E_CORE_ERROR:
                         case E_COMPILE_ERROR:
@@ -2265,11 +2276,11 @@
                                 /* throw an exception if we are in EH_THROW mode
                                  * but DO NOT overwrite a pending exception
                                  */
- if (PG(error_handling) == EH_THROW && !EG(exception)) {
+ if (error_handling == EH_THROW && !EG(exception)) {
 #if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1) || PHP_MAJOR_VERSION >= 6
- zend_throw_error_exception(PG(exception_class), buffer, 0, type TSRMLS_CC);
+ zend_throw_error_exception(exception_class, buffer, 0, type TSRMLS_CC);
 #else
- zend_throw_exception(PG(exception_class), buffer, 0 TSRMLS_CC);
+ zend_throw_exception(exception_class, buffer, 0 TSRMLS_CC);
 #endif
                                 }
                                 efree(buffer);
Received on Thu Mar 13 2008 - 15:15:40 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST