Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9565 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65946 invoked by uid 1010); 26 Apr 2004 08:35:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65778 invoked from network); 26 Apr 2004 08:35:57 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 26 Apr 2004 08:35:57 -0000 Received: (qmail 4886 invoked from network); 26 Apr 2004 08:35:54 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 26 Apr 2004 08:35:54 -0000 Message-ID: <5.1.0.14.2.20040426113436.0240d3f0@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 26 Apr 2004 11:35:51 +0300 To: "Sara Golemon" ,internals@lists.php.net In-Reply-To: <20040426051635.66824.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Bug#28151 Writing to Uninitialized Arrays From: andi@zend.com (Andi Gutmans) References: <20040426051635.66824.qmail@pb1.pair.com> PHP has always allowed defining arrays on demand. This would break many scripts and I don't see any reason to force people to define variables as arrays, especially when these variables are undefined. Andi At 10:18 PM 4/25/2004 -0700, Sara Golemon wrote: >Here's what I think is the fix for 28151 (I have no strong feelings on >whether or not it belongs in the engine, but I am +1 on it personally). >Zend guys? > > >Index: Zend/zend_execute.c >=================================================================== >RCS file: /repository/ZendEngine2/zend_execute.c,v >retrieving revision 1.643 >diff -u -r1.643 zend_execute.c >--- Zend/zend_execute.c 15 Apr 2004 21:32:34 -0000 1.643 >+++ Zend/zend_execute.c 26 Apr 2004 05:06:59 -0000 >@@ -919,6 +919,7 @@ > SEPARATE_ZVAL(container_ptr); > container = *container_ptr; > } >+ zend_error(E_NOTICE, "Uninitialized array"); > array_init(container); > break; > } > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php