Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24724 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22387 invoked by uid 1010); 19 Jul 2006 19:59:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 22371 invoked from network); 19 Jul 2006 19:59:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2006 19:59:30 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:51741] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 4B/91-29121-27A8EB44 for ; Wed, 19 Jul 2006 15:39:30 -0400 Received: from baumbart.mbo (dslb-084-063-014-040.pools.arcor-ip.net [84.63.14.40]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 5982135C1FF; Wed, 19 Jul 2006 21:39:27 +0200 (CEST) Date: Wed, 19 Jul 2006 21:39:42 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <382048148.20060719213942@marcus-boerger.de> To: Pierre Cc: internals@lists.php.net, christian.stocker@bitflux.ch (Christian Stocker) In-Reply-To: <20060719155615.35eff909@pierre-u64> References: <44BE2AE5.4090700@bitflux.ch> <10845a340607190624w44b6d7b1ycff7610d03cc3676@mail.gmail.com> <44BE347A.5060106@bitflux.ch> <20060719155615.35eff909@pierre-u64> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP 5.2-dev "Cannot use array returned from foo::__get('bar') in write context" From: helly@php.net (Marcus Boerger) Hello Pierre, Wednesday, July 19, 2006, 3:56:15 PM, you wrote: > On Wed, 19 Jul 2006 15:32:42 +0200 > christian.stocker@bitflux.ch (Christian Stocker) wrote: >> >> >> On 19.7.2006 15:24 Uhr, Richard Quadling wrote: >> > For PHP 5.2.0-dev (cli) (built: Jul 12 2006 12:20:25), I get ... >> > >> > Fatal error: Cannot use array returned from foo::__get('bar') in >> > write context in C:\- on line 16 >> > >> > But only once, not 1 per line. >> > >> > $f = new foo(); >> > $a = $f->bar; >> > foreach($a as $key => $value) >> > >> > fixes the code. >> > >> >> I know (forgot to mention it), but still annoying as I have to fix a >> lot of lines to do that. >> >> If there are technical reasons for the fatal error, fine, I have to >> live with it then. > If there is good reasons for this change, it should be a good candidate > for E_STRICT but not E_FATAL/RECOVERABLE. Wrong answer and not an option at all - sorry. But we are actually preventing potential SEGVs here. Just like the mighty reference thing that lead to PHP 4.4. > We should also have a notice in the upgrading notes. I can do it as > soon as we agreed on a solution. Why not write one since you are obviously aware of this. I wasn't until this very momnet as i never use __get(), since i know it has too many issues and causes to many problems. So here i am probbaly the wrong person to write something. Best regards, Marcus