Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56565 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83258 invoked from network); 24 Nov 2011 10:40:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2011 10:40:14 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.49 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.49 mail-qw0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:43345] helo=mail-qw0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/45-46656-D0F1ECE4 for ; Thu, 24 Nov 2011 05:40:13 -0500 Received: by qabj40 with SMTP id j40so19110qab.8 for ; Thu, 24 Nov 2011 02:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xDFEyOBH0XEtlRAFhIisECZ3RIPXjE7mcfIvEDCqltk=; b=iEW6oSDJ++xIrG6SyZ/F4EN8G80Mu1AHmfJ/UyU8PsWmDdSeGUGd0tpnPqZZarWdP7 1Lml5EH7Cof2QRz2Mu53vRATpYf5mVjNbvot2pLp+lswDEpgVt6ul6918cHUvNmUjNck /6grUPf/TSzfueMEIvG1e0QCDwxkCDGh/7x6k= MIME-Version: 1.0 Received: by 10.224.189.66 with SMTP id dd2mr3343777qab.48.1322131209920; Thu, 24 Nov 2011 02:40:09 -0800 (PST) Received: by 10.229.38.134 with HTTP; Thu, 24 Nov 2011 02:40:09 -0800 (PST) In-Reply-To: References: <20111123015008.GA12933@panix.com> <20111123023108.GA172@panix.com> <4ECCB549.904@lsces.co.uk> <4ECCBC56.3050602@sugarcrm.com> <20111123141408.GA11940@panix.com> <4ECD40E2.1000601@sugarcrm.com> <4ECD48AD.1020207@sugarcrm.com> <4ECD91F4.5040303@gmail.com> <4ECD92FD.7040609@sugarcrm.com> <4ECD9998.4060203@lsces.co.uk> <4ECDA01B.5090606@sugarcrm.com> Date: Thu, 24 Nov 2011 11:40:09 +0100 Message-ID: To: devis@lucato.it Cc: Stas Malyshev , Lester Caine , PHP internals Content-Type: multipart/alternative; boundary=20cf303346551d210f04b278a94c Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: tyra3l@gmail.com (Ferenc Kovacs) --20cf303346551d210f04b278a94c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Nov 24, 2011 at 11:05 AM, wrote: > On 24 November 2011 01:38, Stas Malyshev wrote: > > Hi! > > > >> But neither is introducing a potential bomb of the kind that the 'date= ' > >> saga > >> created. The problem this change IS causing is likely to hit many live > >> sites > > > > The claim that many live sites actually regularly use string multiple > string > > offsets to distinguish strings from arrays sounds implausible to me. > > > > > Hi, > > I hadn't the opportunity to install php 5.4 to test this, so I was > wondering if someone could test how would this code behave ? > > ########### > if ( > !isset( $widget_options['dashboard_incoming_links'] ) > || !isset( $widget_options['dashboard_incoming_links']['home'] ) > || $widget_options['dashboard_incoming_links']['home'] !=3D > get_option('home') ) > ########### > > Is that correct saying that if the first condition is false the second > will always be true ? > > Note: that's a piece of Wordpress > > hi. you can also test it http://codepad.viper-7.com/ if you don't want/can't have a build from source. What does get_option('home') return? From a quick glance, I think that you are safe, except if you get a string instead of an array(either for $widget_options or $widget_options['dashboard_incoming_links']), and the first character of that string is a slash and your get_option('home') returns a slash also. in which case your code will behave as it would get a correct array having $widget_options['dashboard_incoming_links']['home'] =3D '/' --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --20cf303346551d210f04b278a94c--