php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43533 escapeshellarg('') returns null
Submitted: 2007-12-08 02:58 UTC Modified: 2007-12-09 16:37 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: josephk at etelos dot com Assigned:
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 5.2.5 OS: Cent OS 5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: josephk at etelos dot com
New email:
PHP Version: OS:

 

 [2007-12-08 02:58 UTC] josephk at etelos dot com
Description:
------------
escapeshellarg() returns null when passed an empty string instead of returning an empty string.  The documentation doesn't say anything about giving a return value of null.

Reproduce code:
---------------
<?php
var_dump(escapeshellarg(''));
?>

Expected result:
----------------
string ''

Actual result:
--------------
null

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-08 10:59 UTC] felipe@php.net
In PHP 5.3.0-dev (cli) (built: Dec  7 2007 22:22:09) it shows:
string(2) "''"
 [2007-12-09 04:30 UTC] crrodriguez at suse dot de
5_2 returns NULL (wrong value) , for some reason 5_3 is right.
 [2007-12-09 16:37 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 30 16:01:29 2024 UTC