Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48381 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2146 invoked from network); 22 May 2010 14:42:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 May 2010 14:42:18 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 209.85.212.42 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:64289] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/26-46027-94DE7FB4 for ; Sat, 22 May 2010 10:42:17 -0400 Received: by vws15 with SMTP id 15so753557vws.29 for ; Sat, 22 May 2010 07:42:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.157.136 with SMTP id b8mr1981374vcx.170.1274539333813; Sat, 22 May 2010 07:42:13 -0700 (PDT) Received: by 10.220.70.148 with HTTP; Sat, 22 May 2010 07:42:13 -0700 (PDT) In-Reply-To: <4BF6AD07.7090001@moonspot.net> References: <4BF6A90D.8020901@smashlabs.com> <4BF6AD07.7090001@moonspot.net> Date: Sat, 22 May 2010 10:42:13 -0400 Message-ID: To: Brian Moon Cc: Ralph Schindler , internals Content-Type: multipart/alternative; boundary=e0cb4e887cab3e8d4604872fd0bf Subject: Re: [PHP-DEV] Fixes for parse_url, bug 50563 From: ilia@prohost.org (Ilia Alshanetsky) --e0cb4e887cab3e8d4604872fd0bf Content-Type: text/plain; charset=ISO-8859-1 Instead of removing a warning, why not add an additional parameter to the function that would instruct it to silence warning messages on parse failure? On Fri, May 21, 2010 at 11:55 AM, Brian Moon wrote: > +1 > > > Brian. > -------- > http://brian.moonspot.net/ > > > On 5/21/10 10:38 AM, Ralph Schindler wrote: > >> >> Hey all, >> >> Attached is a patch to remove the warning from parse_url() in situations >> where parse_url() cannot actually parse the url. The bug report also >> claims there should be a new feature for understanding "why" a parsed >> url failed. That code currently does not exist, and the current warning >> gives no more information than simply returning false does. >> >> http://bugs.php.net/bug.php?id=50563 >> >> The first patch is against trunk. I think we should at least get this >> done even if the group decides that down the line we want the why >> portion explained as well (I actually don't care about the why part). >> That feature would require that php_url_parse_ex() add some parsing >> intellignce, this would not be a 1 or 2 line feature implementation. >> >> The motivation is that since false and E_WARN are redunant, this patch >> would allow developers to STOP using @parse_url(), which we have to do. >> >> I also suggest that we apply this to the PHP_5_3 branch. This behavior >> should be backwards compatible with everyone that is actually using the >> @parse_url() in their code. The only 1-off situation that might be >> affected is if people are catching the error with an error handler and >> branching there. Why they wouldn't be branching off the false return >> value, I don't know. >> >> Both patches contain test fixes. >> >> Is there anything more I need? Is this commit worthy? >> >> Thanks, >> Ralph >> >> > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e0cb4e887cab3e8d4604872fd0bf--