Mantis - Quercus
Viewing Issue Advanced Details
4068 minor always 06-03-10 08:25 06-21-12 01:30
hm2k  
nam  
normal  
closed  
fixed  
none    
none  
0004068: pathinfo('test.html.php',PATHINFO_EXTENSION); returns html.php instead of php
<?php

pathinfo('test.html.php',PATHINFO_EXTENSION); //expected php, got html.php

?>

Notes
(0004630)
sblommers   
06-04-10 01:48   
I just tested this and I can confirm this is not working.
Here is a patch to fix this issue agains latest SVN (7180)

url: https://streamconsulting.nl/drop/FileModule_path_4068.diff [^]
or in text

diff -r 9e1bb2e39c7a modules/quercus/src/com/caucho/quercus/lib/file/FileModule.java
--- a/modules/quercus/src/com/caucho/quercus/lib/file/FileModule.java Fri Jun 04 10:36:04 2010 +0200
+++ b/modules/quercus/src/com/caucho/quercus/lib/file/FileModule.java Fri Jun 04 10:46:21 2010 +0200
@@ -2552,7 +2552,7 @@
       dirname = ".";
     }
 
- p = path.indexOf('.');
+ p = path.lastIndexOf('.');
(0004631)
hm2k   
06-04-10 02:01   
Good work :)
(0005545)
lewellyn   
10-06-11 12:36   
I just wanted to vote +1 on the 6-keystroke fix going into Quercus sooner than later. This causes interesting interoperability issues.
(0005920)
nam   
06-21-12 01:30   
php/164y

Fixed for 4.0.29.