Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67909 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56716 invoked from network); 26 Jun 2013 22:13:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2013 22:13:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.44 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.212.44 mail-vb0-f44.google.com Received: from [209.85.212.44] ([209.85.212.44:62114] helo=mail-vb0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/F0-51393-6976BC15 for ; Wed, 26 Jun 2013 18:13:42 -0400 Received: by mail-vb0-f44.google.com with SMTP id e15so14424vbg.17 for ; Wed, 26 Jun 2013 15:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=L/k3gtHfobx36UH48eW0+sk834p7DGTPxZ7biQ6gapo=; b=euOAlfqKgQEz0UPdyHyEq3HPPeK7IUy4HA9Y9jNDN6rTlOBX1gdH6rzouFIgPfn9/P FH5ZXjwOcvgN/svOlw575jO8lLApzMHSREil8aa+1FnPROG2T/wXRM3iMIamczX8pnST W91OYLhODskEabapiIN5e+bKW1fPWIzSef7dl6muG7jIwHVuYlqk5SKHeIb40jmNc5oX r7ECD2Rn9vspMqBP0HMEfhBIjditbfvqjjywupTsG4iWDUgGMWBLnpijvg9hfWuyAM4T lIZDpAXn1iXT1ki+WYEZQKek51AIeJX1cEQZCb/cyMaCGjv5mR6NhCA2zo0CeDHPFhov Llqw== MIME-Version: 1.0 X-Received: by 10.58.118.200 with SMTP id ko8mr2383592veb.94.1372284819781; Wed, 26 Jun 2013 15:13:39 -0700 (PDT) Sender: kalle.php@gmail.com Received: by 10.58.200.104 with HTTP; Wed, 26 Jun 2013 15:13:39 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 Jun 2013 00:13:39 +0200 X-Google-Sender-Auth: pjanusbUxr1kJIJ8LvU_CVuiiOo Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] hex2bin: E_WARNING is too much for odd string? From: kalle@php.net (Kalle Sommer Nielsen) Hi 2013/6/26 Yasuo Ohgaki : > PHP 5.4: Keep current behavior > PHP 5.4: Riase E_ERROR and return FALSE for invalid length. > PHP 5.5: Remove E_ERROR. Never ever will we raise an E_ERROR. E_ERROR means that we left the Engine in a state from which we cannot recover from, standard library function should never prevent execution of a script as this will introduce inconsistency, if we leave the Engine in a 'recoverable' state, then we should use E_RECOVERABLE_ERROR, but this is far from that. We already fixed a few of those in the past, I believe when 5.3 was shipped, we had pretty much killed all of those along when the new parameter parsing API was being standardized. I agree that this E_WARNING is sort of serve, and we should just return false for invalid values, as we don't need to be THAT detailed, maybe an E_NOTICE could work better here even in case something fails and the developer must know WHY this happened, I believe we do this in a few places around the core and its extensions. -- regards, Kalle Sommer Nielsen kalle@php.net