php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch php-5-3-splfixedarray-fromarray-should-return-call-scope-instance for SPL related Bug #55128

Patch version 2011-07-26 05:35 UTC

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

Obsoleted by patches:

Patch Revisions:

Developer: laruence@php.net

Index: ext/spl/spl_fixedarray.c
===================================================================
--- ext/spl/spl_fixedarray.c	(revision 313688)
+++ ext/spl/spl_fixedarray.c	(working copy)
@@ -703,7 +703,7 @@
 		spl_fixedarray_init(array, 0 TSRMLS_CC);
 	}
 
-	object_init_ex(return_value, spl_ce_SplFixedArray);
+	object_init_ex(return_value, EG(called_scope)? EG(called_scope) : spl_ce_SplFixedArray);
 	Z_TYPE_P(return_value) = IS_OBJECT;
 
 	intern = (spl_fixedarray_object *)zend_object_store_get_object(return_value TSRMLS_CC);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 09:01:28 2024 UTC