Fixed bug in cli-script argument parsing

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63431 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-10-01 00:55:18 +00:00
parent c08f6e4dbb
commit ba85bc7614
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ if(isset($_SERVER['argv'][2])) {
if(strpos($arg,'=') == false) {
$_GET['args'][] = $arg;
} else {
$newItems = parse_str( (substr($arg,0,2) == '--') ? substr($arg,2) : $arg );
$newItems = array();
parse_str( (substr($arg,0,2) == '--') ? substr($arg,2) : $arg, $newItems );
$_GET = array_merge($_GET, $newItems);
}
}