Bug #14853: escapeshellarg should return '' for empty argument list
| From: | jbriggs at esoft dot com | Date: | Fri, 04 Jan 2002 18:05:57 +0000 |
| Subject: | Bug #14853: escapeshellarg should return '' for empty argument list | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-75882@lists.php.net to get a copy of this message | ||
From: jbriggs@esoft.com
Operating system: Linux
PHP version: 4.1.0
PHP Bug Type: Feature/Change Request
Bug description: escapeshellarg should return '' for empty argument list
If I build a command line like this:
$cmd = "ls ";
$cmd .= escapeshellarg($file);
system($cmd);
It works fine if $file contains data. But if $file is empty, $cmd is "ls "
instead of "ls ''".
The code would be easier to write if escapeshellarg always returned the two
single quotes, even if its argument was blank.
--
Edit bug report at: http://bugs.php.net/?id=14853&edit=1