Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67990 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53036 invoked from network); 28 Jun 2013 02:05:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jun 2013 02:05:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.172 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.216.172 mail-qc0-f172.google.com Received: from [209.85.216.172] ([209.85.216.172:54923] helo=mail-qc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/F6-34034-46FECC15 for ; Thu, 27 Jun 2013 22:05:24 -0400 Received: by mail-qc0-f172.google.com with SMTP id j10so1032017qcx.3 for ; Thu, 27 Jun 2013 19:05:21 -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=DuA2XDhnspD7iNp3bbr38OL0ZACI0jhCF8aHl1qMKr4=; b=cHfuFMLXOk471FsNDqOg3R3ttjOICGjByKl3YkZBaOywgcmikUFOqXjbzSOz6kWONV XFqhQOgwa9jCdzC/s0bECDke1haQdvclFkC8fnNE4bhRrL3cErbJQyg66CGdRyvy31sg ECJq21uNwdQnmThvXRa1L1Nfsi8NtJmfu8VZZ3x+6kiez31Q2UQmdWw6m9ATGTIXEEUG m1oWTWBVezeZeRLBPagFe99/cCeWG7skvCWCD0REFpFqLvQW93Z88D1HujtyNdamkMsl 7uOFRKiQeOviPv3Uhlh40YufbwfyuNsOCUG6RzfcDNwOZazPgWJTMcyZbGLhg/tytstf TPfg== MIME-Version: 1.0 X-Received: by 10.224.190.137 with SMTP id di9mr14755584qab.95.1372385121655; Thu, 27 Jun 2013 19:05:21 -0700 (PDT) Received: by 10.49.99.67 with HTTP; Thu, 27 Jun 2013 19:05:21 -0700 (PDT) In-Reply-To: References: Date: Fri, 28 Jun 2013 10:05:21 +0800 Message-ID: To: Yasuo Ohgaki Cc: Sherif Ramadan , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=20cf300fb30babdf5e04e02d4fc6 Subject: Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string? From: tjerk.meesters@gmail.com (Tjerk Meesters) --20cf300fb30babdf5e04e02d4fc6 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jun 28, 2013 at 9:27 AM, Yasuo Ohgaki wrote: > Hi Tjerk, > > 2013/6/27 Tjerk Meesters > >> The thread started with the assertion that it raises a warning and the >> commits first remove the warning and then adds it again later, so isn't the >> whole PR a noop? :) > > > The issue is inconsistent behavior of hex2bin against invalid inputs. > Both removing and adding E_WARNING provide consistency. > I didn't look close enough apparently :) > > Adding E_WARNING is better than removing as a result discussion, IMO. > Given the sizeable number of functions that don't raise warnings, should this behaviour then be extended to those as well, e.g. base64_decode(), mb_*()? Of course, doing so puts the onus on the developer to validate their inputs first to prevent warnings, but personally I feel the gauge on likelihood to user input exposure conflicts with consistency concerns. > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.netHi > -- -- Tjerk --20cf300fb30babdf5e04e02d4fc6--