On 07/14/2006 10:09 PM Christian Schneider wrote: > Tobias Schlitt wrote:
>> using string manipulation, I now patched pathinfo() to provide the >> filename without extension per default with key "filename". >> >> Find the patch here: http://schlitt.info/misc/pathinfo.patch > If the patch is considered then I would propose to also return the key > "filename" if the filename does not have a suffix. The current code > seems to only return it if it can find a '.' in the filename. > > I.e. change > if (p) { > idx = p - ret; > add_assoc_stringl(tmp, "filename", ret, idx, 1); > } > > to > idx = p ? (p - ret) : ret_len; > add_assoc_stringl(tmp, "filename", ret, idx, 1); > or something like that. Valid point. I updated the patch. Have a nice weekend! Toby -- Tobias Schlitt - Zend Certified Engineer GPG Key: 0xC462BC14 a passion for php http://www.schlitt.info Like to say "thank you"? - http://pear.php.net/wishlist.php/toby -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php