Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35585 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25366 invoked by uid 1010); 19 Feb 2008 11:29:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25351 invoked from network); 19 Feb 2008 11:29:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2008 11:29:00 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:44060] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/39-55225-B7DBAB74 for ; Tue, 19 Feb 2008 06:28:59 -0500 Received: from dhcp-172-28-202-237.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 6D9CF1B367D; Tue, 19 Feb 2008 12:28:56 +0100 (CET) Date: Tue, 19 Feb 2008 12:28:58 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1465625877.20080219122858@marcus-boerger.de> To: Felipe Pena CC: internals@lists.php.net In-Reply-To: <1203391281.6475.18.camel@pena> References: <1203391281.6475.18.camel@pena> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Error messages for wrong coding From: helly@php.net (Marcus Boerger) Hello Felipe, Tuesday, February 19, 2008, 4:21:20 AM, you wrote: > Hi. > Looking on "Feature/Change Request", i have seen curious things, and i > think that them should issue any error message. See above. > --- > Bug #39915 - Trying to access the index of an integer should throw a > warning: > Actual result: > $a = 1234; > $a[0]; // Not shows error > Proposed: > - Shows error message (Fatal error, as happens with objects) for > integer and float variables. > http://felipe.ath.cx/diff/bug39915.diff This patch results in two error message for type long, one complaining about long, one about double. You can use function zend_get_type_by_const() to avoid this. Also make sure that we see the new style message for type bool and anything else that is not handled right now (aka just use default case). > --- > Bug #42852 - Inconsistent message when creating default object from > empty value: > Actual result: > $obj1->p = 1; // Shows 'Strict Standards ...' > $obj2->p[] = 1; // Not shows > $a = 1; > $obj3->p = &$a; // Not shows > Proposed: > - 'Strict Standards' for all cases. > http://felipe.ath.cx/diff/bug42852.diff Looks good. Best regards, Marcus