Re: Re: 5dee3c11 break

From: Date: Tue, 06 May 2014 14:48:41 +0000
Subject: Re: Re: 5dee3c11 break
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-73978@lists.php.net to get a copy of this message
If you think the current behavior is right, we need protection from recursion (similar to __get()). Thanks. Dmitry. On Tue, May 6, 2014 at 6:46 PM, Dmitry Stogov <dmitry@zend.com> wrote: > > > > On Tue, May 6, 2014 at 5:11 PM, Levi Morrison <levim@php.net> wrote: > >> On Tue, May 6, 2014 at 6:43 AM, Dmitry Stogov <dmitry@zend.com> wrote: >> >>> zend_std_has_dimension() doesn't know what (check_empty == 2) means. >>> >>> check_empty == 0 - ISSET => we don't need to call offsetGet() and relay >>> on >>> offsetExists() return value. >>> check_empty == 1 - ISEMPTY => we should call offsetGet() after >>> offsetExists(). >>> >>> NULL values should be handled by offsetExists(). >>> >> >> I am a bit curious, isset checks that the variable exists >> and is not >> null; empty checks that the variable exists and is not >> empty. Why does >> one call offsetGet and not the other? Both look at the >> value. >> >> Sorry if I missed that bit of conversation. >> > > yeah, no problem :) > I also, don't talk that my opinion is completely right. > > I think that we make us and users more and more troubles with this messy > behavior. > > Actually, you introduced new behavior (NULL check) and broke at least ZF2 > and probably many based on it applications. > It leads to crash and it'll make bad php experience. > Then someone will report it as a security problem and we all will be > blamed :( > We shouldn't make existing applications crash! > > Thanks. Dmitry. > >

« previous php.internals (#73978) next »