Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.0a3

Request #15688 PATHINFO_FILENAME
Submitted: 2009-01-20 12:11 UTC
From: hm2k Assigned: hm2k
Status: Closed Package: PHP_Compat (version 1.6.0a2)
PHP Version: 5.2.8 OS:
Roadmaps: 1.6.0a3    
Subscription  


 [2009-01-20 12:11 UTC] hm2k (James Wade)
Description: ------------ How would PHP_COMPAT go about adding PATHINFO_FILENAME support for pathinfo()? The only method I could come up with was to create a new function called pathinfo_filename(), and call that instead... See: http://www.php.net/manual/en/function.pathinfo.php#88159 Is this something we should handle in php_compat?

Comments

 [2009-05-01 18:42 UTC] hm2k (James Wade)
I think this would be implimented similar to php_compat_htmlspecialchars() The next step for this is to write a php_compat_pathinfo function that has filename support.
 [2009-05-01 19:56 UTC] hm2k (James Wade)
The following patch has been added/updated: Patch Name: php_compat_pathinfo Revision: 1241189791 URL: http://pear.php.net/bugs/patch-display.php?bug=15688&patch=php_compat_pathinfo&revision=1241189791&display=1
 [2009-05-01 19:57 UTC] hm2k (James Wade)
Attached patch will be added to CVS unless there are any complains. Thanks.
 [2009-05-07 01:51 UTC] arpad (Arpad Ray)
The idea seems ok, but the implementation has some issues: - where do $string and $file come from? Looks like both are meant to be $path - I'd prefer (strpos($path, '.') !== false) against strstr for clarity - PEAR CS Please try to add a phpt test for every change unless we have one which covers it already, saves trivial bugs like that first one and worse!
 [2009-05-07 03:03 UTC] arpad (Arpad Ray)
-Assigned To: +Assigned To: hm2k
 [2010-08-01 19:29 UTC] hm2k (James Wade)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.