Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99297 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42161 invoked from network); 31 May 2017 14:00:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2017 14:00:07 -0000 Received: from [127.0.0.1] ([127.0.0.1:13319]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 9E/0D-43873-66CCE295 for ; Wed, 31 May 2017 10:00:06 -0400 Authentication-Results: pb1.pair.com header.from=raphaelht@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=raphaelht@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: raphaelht@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-oi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:32822] helo=mail-oi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/0D-43873-CBBCE295 for ; Wed, 31 May 2017 09:57:16 -0400 Received: by mail-oi0-f42.google.com with SMTP id w10so16199297oif.0 for ; Wed, 31 May 2017 06:57:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=4Zr7SUnI1NiD7r1hCMG8wDZMezy9TiH7yb7JIk5SDHg=; b=A/WJF/Pxd6hRI/74fZtGRt2l9ewAwS3EKQBeTUThhXroRHMjyJPPW4NDvQrPO3gGlT MG49WzWhKdDTMPp+ieSoEYrzsMLAUtra+1bv2aujj1iyHdFsbtDS37E/AJEjyjVWhfJA +Oqz2Awbrh8wDOEPc6ZSTROGvt2BWq5C8PqbtMLqIdvcb79dOiMC2JU/JzQej6zQLTWP s/JbxmPFniQ/xKCZoNyErZVjIBKuxsQvLshxIKxmL6W6QehoMSx2Y5OEjwtIFLmVrARB 7s6gG4whFkxsA6lPnPBEhltYFXdP8dB/Lf//c9+trb/8Ywvz1WWsE+IOja2XYAy6c3oz A7hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4Zr7SUnI1NiD7r1hCMG8wDZMezy9TiH7yb7JIk5SDHg=; b=WHg8ItX55v7p/ctuTqeHR383HCAh8UeZTYeUlCwZyhNMjCH/wtTP87ZRa9StyjFpzk SigQuIxiKxnrCZzxsaVSPFgwIQhJBom09KRtOj4HhV/rFA7KtTQsWFMRJKxGcQuTXPvL kAZuD1tWgSRSIUcG9drIW5dE2Ix/CzA0KOGCXcgs7TVNj3eXPlyc0HvLxVOt3AU8+reP CXoY9hAz1qVM6SmGi/QR270BZRDhFv622bF1HuODNm0auDtE5VMCKsLC0ShXblK+uEos vJ05ip9iAZjepdX1qg+BDsT5DE/z2hqFB88f7kVMm/edf+PhG+TVxHIgS1jUb+gGv39X Rn/Q== X-Gm-Message-State: AODbwcAzGAcKeVs88uGoWg/TQTgCuBV1dTivGgVWnWXZu3ETqB6sQjSI ORnRevT4OBdsDb+2SkL7yUCwneP2Vcsc X-Received: by 10.157.48.41 with SMTP id d38mr14056651otc.254.1496239032885; Wed, 31 May 2017 06:57:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.240.196 with HTTP; Wed, 31 May 2017 06:57:12 -0700 (PDT) Date: Wed, 31 May 2017 15:57:12 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="001a1135108e0de8630550d24cfe" Subject: Testing RFC From: raphaelht@gmail.com (=?UTF-8?Q?Rapha=C3=ABl_Huchet?=) --001a1135108e0de8630550d24cfe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, My name is Rapha=C3=ABl. I'm testing an idea before sending (with your help= ) a RFC. Thank for your feedback! This is a well-known PHP message: Notice: Undefined index: id in /xxx/yyy on line 5 Now this is a code example I have seen several times: $foos =3D get_foos(); $bar =3D get_bar(); foreach($foos as $foo) { if ($foo['id'] =3D=3D $bar['id']) { echo 'found!'; } } I think there is a problem with the error message in this type of case: is $foo['id'] or $bar['id'] not set ? I don't know. I'm not sure my example is relevant enough, but I think error message must be as clear as possible to help user in debugging. And I just had a similar problem today (and was thinking: "it's not the first time I see this kind of problem"). So what I could propose may be replacing the error message by something like: Notice: Undefined index: id for $foo in /xxx/yyy on line 5 I'm not aware of the error code format, so I'm sure it must be adapted to be more PHP-error-ish. What do you think? *(side question: am I asking to the right place?)* Regards, Rapha=C3=ABl HUCHET Have a nice day! --001a1135108e0de8630550d24cfe--