|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-11-22 13:32 UTC] greg at chiaraquartet dot net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 11:00:01 2025 UTC | 
Description: ------------ If passed "-f test.phar" it will try to use "/home/myuserest.phar" as $d ends up being "." (stupid PECL bug system won't let me add a comment to an existing issue) Reproduce code: --------------- Patch: diff -ur T/clicommand.inc phar/clicommand.inc --- old/clicommand.inc 2007-11-20 17:23:27.000000000 -0500 +++ new/clicommand.inc 2007-11-20 17:38:02.000000000 -0500 @@ -214,12 +214,13 @@ static function cli_arg_typ_filenew($arg, $cfg, $key) { $d = dirname($arg); + $b = basename($arg); $f = realpath($d); if ($f === false) { self::error("Path for file '$arg' does not exist.\n"); } - return $f . substr($arg, strlen($d));; + return $f . '/' . $b; } static function cli_arg_typ_filecont($arg, $cfg, $key)