php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52939
Patch zend_call_user_function_prefer_ref revision 2010-09-28 01:57 UTC by cataphract@php.net
revision 2010-09-28 01:50 UTC by cataphract@php.net

Patch zend_call_user_function_prefer_ref for Scripting Engine problem Bug #52939

Patch version 2010-09-28 01:50 UTC

Return to Bug #52939 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions: 2010-09-28 01:57 UTC | 2010-09-28 01:50 UTC

Developer: cataphract@php.net

Line 1 (now 1), was 15 lines, now 13 lines

  Index: zend_execute_API.c
  ===================================================================
  --- zend_execute_API.c	(revision 303758)
  +++ zend_execute_API.c	(working copy)
 @@ -860,7 +860,9 @@
  		if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
  			&& !PZVAL_IS_REF(*fci->params[i])) {
 @@ -857,7 +857,7 @@
  			SEPARATE_ZVAL(fci->params[i]);
  		}
   
 -			if (Z_REFCOUNT_PP(fci->params[i]) > 1) {
 +			if (Z_REFCOUNT_PP(fci->params[i]) > 1 &&
 +				ARG_MUST_BE_SENT_BY_REF(EX(function_state).function, i + 1)) {
 +
  				zval *new_zval;
 -		if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
 +		if (ARG_MUST_BE_SENT_BY_REF(EX(function_state).function, i + 1)
  			&& !PZVAL_IS_REF(*fci->params[i])) {
   
  				if (fci->no_separation) {
  			if (Z_REFCOUNT_PP(fci->params[i]) > 1) {
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 04:02:11 2014 UTC