we've been experiencing a strange problem with PEAR's error constants not being defined. The actual place where this happens is the podcast event plugin (serendipity_event_podcast). It's not a plugin issue, its something that I think affects every code that uses the bundled PEAR libs (HTTP/Request,Net/Socket etc.)
Inside bundled-libs/PEAR.php there is a:
Code: Select all
if ( class_exists('PEAR') ) {
return false;
}
You can test for yourself with something like:
Code: Select all
<?php
require_once 'bundled-libs/PEAR.php';
echo "pear const: " . PEAR_ERROR_RETURN . " <<\n";
var_dump($GLOBALS); // make sure to grep for '^_PEAR'
?>
The effect of this, is that module don't actually control the PEAR error reporting mechanisms, unless they redefine those constants, which may or may not be an actual issue.
I guess a workaround inside PEAR.php would be using the trick like in other places around the source:
# PEAR.php
if ( defined('S9Y_PEAR') ) return false;
define ('S9Y_PEAR', 1);
here's my OS info:
6.2-STABLE FreeBSD 6.2-STABLE #1
PHP 4.4.7 with Suhosin-Patch 0.9.6 (cli) (built: Jul 30 2007 21:40:22)
Zend Engine v1.3.0
Apache/1.3.37 (Unix)
EDIT:
the s9y version is the latest official release - 1.2