Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19883 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25700 invoked by uid 1010); 1 Nov 2005 13:43:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25684 invoked from network); 1 Nov 2005 13:43:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Nov 2005 13:43:55 -0000 X-Host-Fingerprint: 217.11.251.249 maxipes.logix.cz Linux 2.5 (sometimes 2.4) (4) Received: from ([217.11.251.249:51687] helo=maxipes.logix.cz) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id FF/86-02082-A1177634 for ; Tue, 01 Nov 2005 08:43:55 -0500 Received: from [213.151.94.164] (vrana.iinfo.cz [213.151.94.164]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxipes.logix.cz (Postfix) with ESMTP id 02B501F76C for ; Tue, 1 Nov 2005 13:43:50 +0000 (UTC) Date: Tue, 1 Nov 2005 14:37:33 +0100 X-Mailer: The Bat! (v2.12.00) Personal X-Priority: 3 (Normal) Message-ID: <825002549.20051101143733@vrana.cz> To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: E_NOTICE should warn of uninitialized arrays From: vrana@php.net (Jakub Vrana) Hello! E_NOTICE warns of uninitialized variables but doesn't warn of adding elements to an uninitialized array ($a[] = 5). It is a very similar problem so E_NOTICE should warn of it either. It's the same bad practice as working with uninitialized variables with the same security risks and IMHO the programmer should be warned of it. There is a bug regarding this topic marked as bogus by Iliia: http://bugs.php.net/bug.php?id=28151 Is current behavior really expected and wanted? Jakub Vrana