Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56484 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65627 invoked from network); 23 Nov 2011 08:59:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2011 08:59:00 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.26.187 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.26.187 c2beaomr09.btconnect.com Received: from [213.123.26.187] ([213.123.26.187:22075] helo=mail.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/C2-45113-BC5BCCE4 for ; Wed, 23 Nov 2011 03:58:54 -0500 Received: from host81-138-11-136.in-addr.btopenworld.com (EHLO _10.0.0.4_) ([81.138.11.136]) by c2beaomr09.btconnect.com with ESMTP id FGW44595; Wed, 23 Nov 2011 08:56:42 +0000 (GMT) Message-ID: <4ECCB549.904@lsces.co.uk> Date: Wed, 23 Nov 2011 08:56:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Firefox/7.0.1 SeaMonkey/2.4.1 MIME-Version: 1.0 To: PHP internals References: <20111123015008.GA12933@panix.com> <20111123023108.GA172@panix.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mirapoint-IP-Reputation: reputation=Good-1, source=Queried, refid=tid=0001.0A0B0303.4ECCB549.00BB, actions=tag X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.11.23.80315:17:7.586, ip=81.138.11.136, rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __CT, __CT_TEXT_PLAIN, __CTE, __ANY_URI, __URI_NO_MAILTO, __CP_URI_IN_BODY, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_2000_2999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_7000_LESS X-Junkmail-Status: score=10/50, host=c2beaomr09.btconnect.com X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0209.4ECCB5C8.016F:SCFSTAT14830815,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=multiengine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: lester@lsces.co.uk (Lester Caine) Etienne Kneuss wrote: >>> AFAIK this is one of the change that was explicitly put in to make it >>> >> more consistent. >> > >> > But now it breaks code in the wild. I came across this due to an >> > isset() in PEAR now passing when it didn't before. > PEAR is definitely doing some strange things:) Is it checking indices > of a variables without checking first if it's an array? > Sounds like the comeback of "Please don't break bad code!" seen with is_a:) > > IMO it still makes sense to make that change for 5_4, makes everything > less magic and more consistent. I'm having a lot of trouble with working out WHAT is going on here at all. https://bugs.php.net/bug.php?id=60362 as far as I can tell is using array and sub array elements? Strings don't come into the equation? So I check if I've populated the sub-array be seeing if a sub array element exists, such as would happen if I've populated the array in a previous scan through, but now I'm getting sub array elements caused by some conversion of the string making up the element above? Now that this activity has been highlighted it may well explain why I'm getting problems with a section of code that is building a complex tree structure array from GEDCOM data strings ... since the code is not my own working out where things were breaking down was a problem I simply do not have time to investigate. It currently fails on PHP5.4 and it took some time to tidy the code on 5.3 ... and that still only runs with warnings switched off :( So what is the current preferred method of checking if sub array elements have been created manually, rather than as 'less magic' string elements? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php