cellog Wed Jun 24 22:12:47 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-srcNEWS
/php-src/ext/phar/phar pharcommand.inc
Log:
fix slightly unclear error message in generation of phar.phar
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.647r2=1.2027.2.547.2.965.2.648diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.647
php-src/NEWS:1.2027.2.547.2.965.2.648
--- php-src/NEWS:1.2027.2.547.2.965.2.647 Wed Jun 24 17:43:09 2009
+++ php-src/NEWSWed Jun 24 22:12:47 2009
@@ -1,6 +1,7 @@
PHPNEWS
|||
?? ??? 2009, PHP 5.3.0 RC 5
+- Fixed slightly unclear message in generation of phar.phar. (Greg+others)
- Fixed memory leak in json_decode() when depth is less than 0. (Felipe)
- Fixed bug #48643 (String functions memory issue). (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar/pharcommand.inc?r1=1.49.2.15r2=1.49.2.16diff_format=u
Index: php-src/ext/phar/phar/pharcommand.inc
diff -u php-src/ext/phar/phar/pharcommand.inc:1.49.2.15
php-src/ext/phar/phar/pharcommand.inc:1.49.2.16
--- php-src/ext/phar/phar/pharcommand.inc:1.49.2.15 Thu Jun 4 12:22:32 2009
+++ php-src/ext/phar/phar/pharcommand.inc Wed Jun 24 22:12:47 2009
@@ -210,16 +210,28 @@
*/
static function cli_arg_typ_loader($arg, $cfg, $key)
{
- if (($arg == '0' || $arg == '1') !file_exists($arg)) {
+ if (($arg == '0' || $arg == '1') !file_exists($arg)
substr(PHP_OS, 0, 3) != 'WIN') {
$found = NULL;
- $apiver = `pear -q info PHP_Archive 2/dev/null|grep
'API Version'`;
- $apiver = trim(substr($apiver, strlen('API Version')));
+ $apiver = false;
+ $path = explode(PATH_SEPARATOR, $_ENV['PATH']);
+ $pear = false;
+ foreach ($path as $component) {
+ if (file_exists($component .
DIRECTORY_SEPARATOR . 'pear')
+is_executable($component .
DIRECTORY_SEPARATOR . 'pear')) {
+ $pear = true;
+ break;
+ }
+ }
+ if ($pear) {
+ $apiver = `pear -q info PHP_Archive
2/dev/null|grep 'API Version'`;
+ $apiver = trim(substr($apiver, strlen('API
Version')));
+ }
if ($apiver) {
- self::notice(Pear package PHP_Archive: API
Version: $apiver.\n);
+ self::notice(PEAR package PHP_Archive: API
Version: $apiver.\n);
$files = explode(\n, `pear list-files
PHP_Archive`);
$phpdir = `pear config-get php_dir 2/dev/null`;
$phpdir = trim($phpdir);
- self::notice(Pear package PHP_Archive:
$phpdir.\n);
+ self::notice(PEAR package PHP_Archive:
$phpdir.\n);
if (is_dir($phpdir)) {
foreach($files as $ent) {
$matches = NULL;
@@ -234,13 +246,13 @@
}
}
} else {
- self::notice(Pear package PHP_Archive:
corrupt or inaccessible base dir: $php_dir.\n);
+ self::notice(PEAR package PHP_Archive:
corrupt or inaccessible base dir: $php_dir.\n);
}
}
if (isset($found)) {
- self::notice(Pear package PHP_Archive:
$found.\n);
+ self::notice(PEAR package PHP_Archive:
$found.\n);
} else {
- $msg = Pear package PHP_Archive or Archive.php
class file not found.\n;
+ $msg = PEAR package PHP_Archive not installed:
generated phar will require PHP's phar extension be enabled.\n;
if ($arg == '0') {
self::notice($msg);
} else {
@@ -1554,7 +1566,7 @@
$use_ext = extension_loaded('phar');
$version = array(
'PHP Version' = phpversion(),
- 'phar.phar version' = '$Revision: 1.49.2.15 $',
+ 'phar.phar version' = '$Revision: 1.49.2.16 $',
'Phar EXT