<?php
//
// +----------------------------------------------------------------------+
-// | PHP Version 4 |
+// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
===========================================================================
-|| PEAR Coding Standards ||
+| PEAR Coding Standards |
===========================================================================
$Id$
*/
function isError($data, $code = null)
{
- if (is_object($data) && (get_class($data) == 'pear_error' ||
- is_subclass_of($data, 'pear_error'))) {
+ if (is_object($data) && (strtolower(get_class($data)) == 'pear_error' ||
+ is_subclass_of($data, 'PEAR_Error'))) {
if (is_null($code)) {
return true;
} elseif (is_string($code)) {
function setErrorHandling($mode = null, $options = null)
{
if (isset($this) &&
- (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+ (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
$setmode = &$this->_default_error_mode;
$setoptions = &$this->_default_error_options;
} else {
// $error_code is a non-empty array here;
// we walk through it trying to unset all
// values
- foreach($error_code AS $key => $error) {
+ foreach($error_code as $key => $error) {
if ($this->_checkDelExpect($error)) {
$deleted = true;
} else {
* @param string $message
*
*/
- function &throwError($message = null,
+ function throwError($message = null,
$code = null,
$userinfo = null)
{
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
if (isset($this) &&
- (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+ (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
$def_mode = &$this->_default_error_mode;
$def_options = &$this->_default_error_options;
} else {
$stack[] = array($def_mode, $def_options);
if (isset($this) &&
- (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+ (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);
list($mode, $options) = $stack[sizeof($stack) - 1];
array_pop($stack);
if (isset($this) &&
- (get_class($this) == 'pear' || is_subclass_of($this, 'pear'))) {
+ (strtolower(get_class($this)) == 'pear' || is_subclass_of($this, 'PEAR'))) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);
<?php
//
// +----------------------------------------------------------------------+
-// | PHP Version 4 |
+// | PHP Version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
if (!is_array($argv) && $argv !== null) {
$argv = preg_split('/\s+/', $argv);
}
- return Console_Getopt::getopt($argv, $short_options);
+ return Console_Getopt::getopt2($argv, $short_options);
}
/**
if ($opt[0] == 'p') {
$create_parents = true;
} elseif($opt[0] == 'm') {
+ // if the mode is clearly an octal number (starts with 0)
+ // convert it to decimal
+ if (strlen($opt[1]) && $opt[1]{0} == '0') {
+ $opt[1] = octdec($opt[1]);
+ } else {
+ // convert to int
+ $opt[1] += 0;
+ }
$mode = $opt[1];
}
}
<name>Stig Bakken</name>
<email>stig@php.net</email>
</maintainer>
+ <maintainer>
+ <user>cellog</user>
+ <role>helper</role>
+ <name>Greg Beaver</name>
+ <email>cellog@php.net</email>
+ </maintainer>
</maintainers>
<release>
<version>1.2</version>
<notes>Fix to preserve BC with 1.0 and allow correct behaviour for new users</notes>
<state>stable</state>
<filelist>
- <dir name="Console">
- <file role="php" name="Getopt.php"/>
- </dir>
+ <dir name="Console">
+ <file role="php" name="Getopt.php"/>
+ </dir>
</filelist>
</release>
<changelog>
</filelist>
</release>
<release>
- <version>0.11</version>
- <date>2002-05-26</date>
- <notes>POSIX getopt compatibility fix: treat first element of args
- array as command name
- </notes>
- <state>beta</state>
- <filelist>
- <dir name="Console">
- <file role="php" name="Getopt.php"/>
- </dir>
- </filelist>
- </release>
- <release>
- <version>0.10</version>
- <date>2002-05-12</date>
- <notes>Packaging fix</notes>
- <state>beta</state>
- </release>
- <release>
- <version>0.9</version>
- <date>2002-05-12</date>
- <notes>Initial release</notes>
- <state>beta</state>
- </release>
+ <version>0.11</version>
+ <date>2002-05-26</date>
+ <notes>POSIX getopt compatibility fix: treat first element of args
+ array as command name
+ </notes>
+ <state>beta</state>
+ <filelist>
+ <dir name="Console">
+ <file role="php" name="Getopt.php"/>
+ </dir>
+ </filelist>
+ </release>
+ <release>
+ <version>0.10</version>
+ <date>2002-05-12</date>
+ <notes>Packaging fix</notes>
+ <state>beta</state>
+ </release>
+ <release>
+ <version>0.9</version>
+ <date>2002-05-12</date>
+ <notes>Initial release</notes>
+ <state>beta</state>
+ </release>
</changelog>
- </package>
+</package>
</maintainer>
</maintainers>
<release>
- <version>1.3b5</version>
- <date>2003-12-19</date>
+ <version>1.3b6</version>
+ <date>2004-01-26</date>
<state>beta</state>
<notes>
PEAR Installer:
* Bug #248 --force command does not work as expected
* Bug #293 [Patch] PEAR_Error not calling static method callbacks for error-handler
* Bug #324 pear -G gives Fatal Error (PHP-GTK not installed, but error is at engine level)
+* Bug #594 PEAR_Common::analyzeSourceCode fails on string with $var and {
* Moved download code into its own class
* Fully unit tested the installer, packager, downloader, and PEAR_Common
<dep type="pkg" rel="ge" version="1.1">Archive_Tar</dep>
<dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep>
<dep type="pkg" rel="ge" version="1.0.4">XML_RPC</dep>
- <dep type="ext" rel="has" optional="yes">xmlrpc</dep>
<dep type="ext" rel="has">xml</dep>
+ <dep type="ext" rel="has">pcre</dep>
</deps>
</release>
</package>
<!--
- $Id: package.dtd,v 1.27.4.9 2004-01-25 23:35:02 pajoye Exp $
+ $Id: package.dtd,v 1.27.4.10 2004-01-25 23:42:43 pajoye Exp $
This is the PEAR package description, version 1.0.
It should be used with the informal public identifier: