php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37883 incorrect handling of double quotes in argv parameters
Submitted: 2006-06-22 11:00 UTC Modified: 2006-06-22 19:01 UTC
From: winfried dot pohl at pohl-it dot de Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5CVS-2006-06-22 (snap) OS: Windows 2000/2003
Private report: No CVE-ID: None
 [2006-06-22 11:00 UTC] winfried dot pohl at pohl-it dot de
Description:
------------
php incorrectly handles doubled doublequotes in commandline parameters which are either ignored or result in messed up argv-array

Reproduce code:
---------------
## test.php
<?
print_r($argv);
?>

## commandline 1
php test.php """param1_1""param1_2" "param2" "param3"

## commandline 2
php test.php """param1_1""param1_2" "param2" ""


Expected result:
----------------
Array (
  [0] => test.php
  [1] => "param1_1"param1_2
  [2] => param2
  [3] => param3
)

Array (
  [0] => test.php
  [1] => "param1_1"param1_2
  [2] => param2
  [3] => 
)

Actual result:
--------------
Array (
  [0] => test.php
  [1] => "param1_1param1_2 param2 param3
)

Array (
  [0] => test.php
  [1] => "param1_1param1_2 param2 "
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-22 19:01 UTC] tony2001@php.net
Not PHP problem.
Please report it to Microsoft.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 15:01:31 2024 UTC