FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18362&edit=1

ID: 18362
Updated by: martins.teresko@gmail.com
Reported By: martins dot teresko at gmail dot com
Summary: A whitespace TEMP_DIR path breaks install/upgrade
functionality
Status: Open
Type: Bug
Package: PEAR
Operating System: Windows 7
Package Version: 1.9.2
PHP Version: 5.3.5
Roadmap Versions:
New Comment:

Setting 'pear config-set temp_dir
"C:\Users\MyUserName\AppData\Local\Temp" ' helps, but you have to set it
manually.


Previous Comments:
------------------------------------------------------------------------

[2011-03-14 07:29:53] azazul

Description:
------------
In file PEAR/System.php

function _parseArgs($argv, $short_options, $long_options = null)
{
if (!is_array($argv) && $argv !== null) {
$argv = preg_split('/\s+/', $argv, -1,
PREG_SPLIT_NO_EMPTY);
}
return Console_Getopt::getopt2($argv, $short_options);
}

If $argv contains something like "-t X:\path\to\PHP 5.3\tmp -d pear" ,
then it will split on space in "PHP 5.3".

Test script:
---------------
$args = "-t R:\applications\PHP 5.3\tmp -d pear";
$opts = System::_parseArgs($args, 't:d');
var_dump( $opts );

Expected result:
----------------
i have no idea

Actual result:
--------------
array(2) {
[0]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(1) "t"
[1]=>
string(19) "R:\applications\PHP"
}
}
[1]=>
array(3) {
[0]=>
string(7) "5.3\tmp"
[1]=>
string(2) "-d"
[2]=>
string(4) "pear"
}
}

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 14, '11 at 6:39a
activeMar 14, '11 at 6:39a
posts1
users1
websitepear.php.net

1 user in discussion

Martins Teresko: 1 post

People

Translate

site design / logo © 2021 Grokbase