php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65969
Patch bug65969-2.patch revision 2013-11-27 08:56 UTC by dmitry at zend dot com
revision 2013-11-27 08:55 UTC by dmitry at zend dot com
Patch bug65969.patch revision 2013-11-27 06:32 UTC by laruence@php.net
revision 2013-11-27 05:35 UTC by laruence@php.net
Patch bug65969.phpt revision 2013-11-27 05:39 UTC by laruence@php.net

Patch bug65969.patch for Variables related Bug #65969

Patch version 2013-11-27 06:32 UTC

Return to Bug #65969 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2013-11-27 06:32 UTC | 2013-11-27 05:35 UTC

Developer: laruence@php.net

Line 307 (now 307), was 50 lines, now 4 lines

  +		zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var):NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
   		if (0) {
   			zval_ptr_dtor(&property_name);
   		} else {
 diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
 index b44be12..352dafd 100644
 --- a/ext/standard/user_filters.c
 +++ b/ext/standard/user_filters.c
 @@ -179,6 +179,7 @@ php_stream_filter_status_t userfilter_filter(
  	zval *zclosing, *zconsumed, *zin, *zout, *zstream;
  	zval zpropname;
  	int call_result;
 +	int bailout = 0;
  
  	if (FAILURE == zend_hash_find(Z_OBJPROP_P(obj), "stream", sizeof("stream"), (void**)&zstream)) {
  		/* Give the userfilter class a hook back to the stream */
 @@ -213,12 +214,16 @@ php_stream_filter_status_t userfilter_filter(
  	ZVAL_BOOL(zclosing, flags & PSFS_FLAG_FLUSH_CLOSE);
  	args[3] = &zclosing;
  
 -	call_result = call_user_function_ex(NULL,
 -			&obj,
 -			&func_name,
 -			&retval,
 -			4, args,
 -			0, NULL TSRMLS_CC);
 +	zend_try {
 +		call_result = call_user_function_ex(NULL,
 +				&obj,
 +				&func_name,
 +				&retval,
 +				4, args,
 +				0, NULL TSRMLS_CC);
 +	} zend_catch {
 +		bailout = 1;
 +	} zend_end_try();
  
  	if (call_result == SUCCESS && retval != NULL) {
  		convert_to_long(retval);
 @@ -266,6 +271,10 @@ php_stream_filter_status_t userfilter_filter(
  	zval_ptr_dtor(&zout);
  	zval_ptr_dtor(&zin);
  
 +	if (bailout) {
 +		zend_bailout();
 +	}
 +
  	return ret;
  }
  
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 08 02:03:34 2021 UTC