Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67992 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57112 invoked from network); 28 Jun 2013 02:49:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jun 2013 02:49:06 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-lb0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:53014] helo=mail-lb0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/C7-34034-0A9FCC15 for ; Thu, 27 Jun 2013 22:49:05 -0400 Received: by mail-lb0-f173.google.com with SMTP id v1so767287lbd.4 for ; Thu, 27 Jun 2013 19:49:01 -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:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=hwLVcsKg2UFe74kgzr9YV34V1Y8k/14UrQJ3qfRqVHg=; b=yESXhfzvERm0lxMyPdrJB3Ci/YDHFFKYtAc+cbWU9RVHEBbPKc6hkhbP9SVgsGnFRs wlG0bEaqcEdmOwvvkTVYm5KcEjuc8a6r+LlEQvdchUvXSEOKorMWW/EzFIdIA068Ruwo oUQMmA68QwIRHs0xsSTCLzG4+oZrjcf1orno64VIbMkF0TeEwWwDHgNgh3MdmD67gfLW dIK318QT/RJ0E5ef5iX8IlEvtBZY1Ok1ypPG0CQjJt+NwM9zxpjP0fOwVduAZpwSFmpR GmjYvrdnEOg0DPL26IvgQcZulFFst/kkG2KgGYR/zP6qB5LetkFqYivbECe/RmP75J+h lfSQ== X-Received: by 10.152.28.199 with SMTP id d7mr5492985lah.67.1372387741307; Thu, 27 Jun 2013 19:49:01 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.4.233 with HTTP; Thu, 27 Jun 2013 19:48:21 -0700 (PDT) In-Reply-To: References: Date: Fri, 28 Jun 2013 11:48:21 +0900 X-Google-Sender-Auth: 1TbM0lA1ZSxTF88Yqh_PjR1ujkw Message-ID: To: Tjerk Meesters Cc: Sherif Ramadan , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0160b432d0997904e02debfd Subject: Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string? From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0160b432d0997904e02debfd Content-Type: text/plain; charset=ISO-8859-1 2013/6/28 Tjerk Meesters > >> 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. > Not like function deals with internal data, function that is supposed to deal with external inputs is better if it returns FALSE without error. Since we don't want to handle attack/invalid inputs as errors always. One may treat invalid data as user mistake. It depends of use case of the specific function, if triggering error is better or not. Anyway, mixing them up for a function should not be done, IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0160b432d0997904e02debfd--