Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9898 invoked from network); 6 May 2014 14:50:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 May 2014 14:50:54 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.53 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.219.53 mail-oa0-f53.google.com Received: from [209.85.219.53] ([209.85.219.53:45764] helo=mail-oa0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/82-20698-DC6F8635 for ; Tue, 06 May 2014 10:50:54 -0400 Received: by mail-oa0-f53.google.com with SMTP id m1so7549478oag.26 for ; Tue, 06 May 2014 07:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zOn9Xz6w96nofZKeFhoiwq0tj5uzyQMTnoBMwYCd6zc=; b=HRYzyyy9U5yb8ykDFfRWnEbJwSIVqPpiTxcx0Yrl7kiaAvRhexUj1ANEzCg+CZPsuJ a/XCFSqMdclcjDwK0M+pI2Oi4wLBKeSsn+8VHstIfQsENF36mHlifqQ9+hgLe/xSNQQP +FyiF+qm+EDTwoWevXOiWCqMAZF1iG+FCcU5eHYSF2ihbAIdVlBC6RKFJpLUOxbYeFp0 sihIfuFDt9/DfsUBnqzllXeZFaZyBO40uZ2A06RxY27Z3Af0L13uOPedeamhfNPXWCxP 2Gt1xhLQ3ea/UH4MRwIkMGmvs/Un6RCiDiqF6PF7vz7gKEM5w+E380iQJ3QbmWNVzfUs w3fw== MIME-Version: 1.0 X-Received: by 10.182.97.97 with SMTP id dz1mr26183352obb.13.1399387851669; Tue, 06 May 2014 07:50:51 -0700 (PDT) Received: by 10.76.77.100 with HTTP; Tue, 6 May 2014 07:50:51 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 May 2014 08:50:51 -0600 Message-ID: To: Dmitry Stogov Cc: Tjerk Anne Meesters , Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=047d7b2e4386cd455204f8bc5f8c Subject: Re: [PHP-DEV] Re: 5dee3c11 break From: morrison.levi@gmail.com (Levi Morrison) --047d7b2e4386cd455204f8bc5f8c Content-Type: text/plain; charset=UTF-8 On Tue, May 6, 2014 at 8:46 AM, Dmitry Stogov wrote: > > On Tue, May 6, 2014 at 5:11 PM, Levi Morrison wrote: > >> On Tue, May 6, 2014 at 6:43 AM, Dmitry Stogov 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. > That isn't any new behavior, at least it shouldn't be. `isset` does not ONLY check existence, it checks that the value is not null; see http://php.net/isset 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! > Agreed, but at least from what I understand the current behavior doesn't do what it is supposed to anyway. Sometimes bugs become features but I really don't see this as one of those. We should fix this. That's my $0.02. --047d7b2e4386cd455204f8bc5f8c--