Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48371 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37768 invoked from network); 21 May 2010 15:38:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 May 2010 15:38:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@smashlabs.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@smashlabs.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain smashlabs.com from 67.15.58.61 cause and error) X-PHP-List-Original-Sender: ralph@smashlabs.com X-Host-Fingerprint: 67.15.58.61 openrce.org Linux 2.6 Received: from [67.15.58.61] ([67.15.58.61:40790] helo=users.smashlabs.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/02-45208-019A6FB4 for ; Fri, 21 May 2010 11:38:57 -0400 Received: (qmail 5413 invoked from network); 21 May 2010 10:38:47 -0500 Received: from ip174-70-101-166.no.no.cox.net (HELO ralph-macbook.local) (174.70.101.166) by smashlabs.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 21 May 2010 10:38:47 -0500 Message-ID: <4BF6A90D.8020901@smashlabs.com> Date: Fri, 21 May 2010 10:38:53 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: internals Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Fixes for parse_url, bug 50563 From: ralph@smashlabs.com (Ralph Schindler) 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