Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18666 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5254 invoked by uid 1010); 4 Sep 2005 10:37:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5237 invoked from network); 4 Sep 2005 10:37:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2005 10:37:42 -0000 X-Host-Fingerprint: 195.186.18.61 mail11.bluewin.ch Received: from ([195.186.18.61:62954] helo=mail11.bluewin.ch) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 9F/E9-33268-47ECA134 for ; Sun, 04 Sep 2005 06:37:40 -0400 Received: from [10.0.0.1] (83.76.41.18) by mail11.bluewin.ch (Bluewin 7.2.063) id 430D821C001F480D for internals@lists.php.net; Sun, 4 Sep 2005 10:37:37 +0000 Message-ID: <431ACE6C.3060006@php.net> Date: Sun, 04 Sep 2005 12:37:32 +0200 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: E_NOTICE/E_STRICT/E_WARNING thrown on bad arrays initialization? From: colder@php.net (Etienne Kneuss) Hi, As you surely know, arrays are often badly initialized: Wouldn't it be such a good thing to let the programmers know that this is a bad habit, by throwing a +/- pedantic error ? I'm not sure which type would suit for it, but I think its important enough to throw a E_NOTICE. It can be dangerous if the script is ran on an environment where register_globals is enabled. I wrote a paper about this kind of leak if you can't imagine an example: http://www.colder.ch/news/09-04-2005/4/another-example-showing-t.html Thanks for your interrest -- Etienne Kneuss http://www.colder.ch/ colder@php.net