Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11872 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76407 invoked by uid 1010); 3 Aug 2004 12:55:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76383 invoked from network); 3 Aug 2004 12:55:59 -0000 Received: from unknown (HELO is.magroup.ru) (213.33.179.242) by pb1.pair.com with SMTP; 3 Aug 2004 12:55:59 -0000 Received: from grp-dovgal.media-arts.ru ([192.168.3.226]) by is.magroup.ru with Microsoft SMTPSVC(5.0.2195.6713); Tue, 3 Aug 2004 16:56:58 +0400 Date: Tue, 3 Aug 2004 16:56:58 +0400 To: php-dev Message-ID: <20040803165658.28ea2bbf.tony2001@phpclub.net> X-Mailer: Sylpheed version 0.9.12cvs1 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Tue__3_Aug_2004_16_56_58_+0400_lh9g5LWkKMk=5WAc" X-OriginalArrivalTime: 03 Aug 2004 12:56:58.0584 (UTC) FILETIME=[5C99A580:01C47959] Subject: [PATCH for ZE] fix for #29504 From: tony2001@phpclub.net (Antony Dovgal) --Multipart=_Tue__3_Aug_2004_16_56_58_+0400_lh9g5LWkKMk=5WAc Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi all! In attachment you can find really tiny patch, that fixes #29504 (improper handling of default array properties). --- WBR, Antony Dovgal aka tony2001 tony2001@phpclub.net || antony@dovgal.com --Multipart=_Tue__3_Aug_2004_16_56_58_+0400_lh9g5LWkKMk=5WAc Content-Type: text/plain; name="patch_29504.diff.txt" Content-Disposition: attachment; filename="patch_29504.diff.txt" Content-Transfer-Encoding: 7bit Index: zend_builtin_functions.c =================================================================== RCS file: /repository/ZendEngine2/zend_builtin_functions.c,v retrieving revision 1.242 diff -u -r1.242 zend_builtin_functions.c --- zend_builtin_functions.c 27 Jul 2004 01:33:25 -0000 1.242 +++ zend_builtin_functions.c 3 Aug 2004 12:48:24 -0000 @@ -702,6 +702,12 @@ zval_copy_ctor(prop_copy); INIT_PZVAL(prop_copy); + /* this is necessary to make it able to work with default array + * properties, returned to user */ + if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY) { + Z_TYPE_P(prop_copy) = IS_ARRAY; + } + add_assoc_zval(return_value, prop_name, prop_copy); } } --Multipart=_Tue__3_Aug_2004_16_56_58_+0400_lh9g5LWkKMk=5WAc--