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

ID: 18309
Updated by: helgith@gmail.com
Reported By: jan at horde dot org
Summary: Cannot install validation package because installer
tries to validate it
Status: Open
Type: Bug
Package: PEAR
Package Version: 1.9.1
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

Do you have an example custom validation which reproduces the problem?
Would be
useful to write tests.

Previous Comments:

[2011-02-24 18:20:01] yunosh

Added #patch


[2011-02-24 16:04:16] yunosh

To avoid the chicken-and-egg problem, the PEAR installer is supposed to
always validate channel validator packages with PEAR_Validate. The
detection of validator packages is broken though.

The check is done in PEAR_ChannelFile::getValidationObject():

if ($package == $this->_channelInfo['validatepackage']) {
// channel validation packages are always validated by
$val = &new PEAR_Validate;
return $val;

This check is broken in two ways though.
1) The package name is in
$this->_channelInfo['validatepackage']['_content'] not
2) $package is not passed as a parameter to this method.

The method is called from PEAR_Registry::parsePackageName():

$validate = $chan->getValidationObject();

This should be:

$validate = $chan->getValidationObject($param['package']);

As a side-note, everything breaks completely with a fatal error, because
getValidationObject() might return false, which happens in this case,
yet the return value is unconditionally used as an object in

I don't see a workaround, so <validatepackage> support is completey
brocken at the moment.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
postedFeb 27, '11 at 3:13p
activeFeb 27, '11 at 3:13p

1 user in discussion

Helgith: 1 post



site design / logo © 2022 Grokbase