cvs: pear-core /PEAR/PackageFile/v2 Validator.php
| From: | Greg Beaver | Date: | Sun, 02 Oct 2005 20:27:27 +0000 |
| Subject: | cvs: pear-core /PEAR/PackageFile/v2 Validator.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-35231@lists.php.net to get a copy of this message | ||
cellog Sun Oct 2 16:27:27 2005 EDT
Modified files:
/pear-core/PEAR/PackageFile/v2 Validator.php
Log:
fix <installconditions> validation in PHP 5.0.5
# ANOTHER BC break in PHP?! isset() does not work
# for array indices any longer if the var isn't an array
http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.74&r2=1.75&ty=u
Index: pear-core/PEAR/PackageFile/v2/Validator.php
diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.74
pear-core/PEAR/PackageFile/v2/Validator.php:1.75
--- pear-core/PEAR/PackageFile/v2/Validator.php:1.74 Sun Oct 2 16:06:49 2005
+++ pear-core/PEAR/PackageFile/v2/Validator.php Sun Oct 2 16:27:26 2005
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: Validator.php,v 1.74 2005/10/02 20:06:49 cellog Exp $
+// $Id: Validator.php,v 1.75 2005/10/02 20:27:26 cellog Exp $
/**
* Private validation class used by PEAR_PackageFile_v2 - do not use directly, its
* sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller
@@ -923,7 +923,7 @@
function _validateBundle($list)
{
- if (!isset($list['bundledpackage'])) {
+ if (!is_array($list) || !isset($list['bundledpackage'])) {
return $this->_NoBundledPackages();
}
if (!is_array($list['bundledpackage']) ||
!isset($list['bundledpackage'][0])) {
@@ -1238,11 +1238,11 @@
}
}
foreach ($releases as $rel) {
- if (isset($rel['installconditions'])) {
+ if (is_array($rel) && array_key_exists('installconditions', $rel)) {
$this->_validateInstallConditions($rel['installconditions'],
"<$release><installconditions>");
}
- if (isset($rel['filelist'])) {
+ if (is_array($rel) && array_key_exists('filelist', $rel)) {
if ($rel['filelist']) {
$this->_validateFilelist($rel['filelist'], true);