php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60978
Patch wrong_exit_code.patch revision 2012-02-06 09:55 UTC by laruence@php.net
Patch patch_v1 revision 2012-02-04 20:40 UTC by php-dev at zerocue dot com

Patch wrong_exit_code.patch for Scripting Engine problem Bug #60978

Patch version 2012-02-06 09:55 UTC

Return to Bug #60978 | Download this patch
Patch Revisions:

Developer: laruence@php.net

Index: Zend/zend_execute_API.c
===================================================================
--- Zend/zend_execute_API.c	(revision 323082)
+++ Zend/zend_execute_API.c	(working copy)
@@ -1195,11 +1195,12 @@
 		}
 		CG(interactive) = 0;
 
-		retval = SUCCESS;
 		zend_try {
 			zend_execute(new_op_array TSRMLS_CC);
 		} zend_catch {
-			retval = FAILURE;
+			destroy_op_array(new_op_array TSRMLS_CC);
+			efree(new_op_array);
+			zend_bailout();
 		} zend_end_try();
 
 		CG(interactive) = orig_interactive;
@@ -1221,6 +1222,7 @@
 		destroy_op_array(new_op_array TSRMLS_CC);
 		efree(new_op_array);
 		EG(return_value_ptr_ptr) = original_return_value_ptr_ptr;
+		retval = SUCCESS;
 	} else {
 		retval = FAILURE;
 	}
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 22:02:05 2014 UTC