PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_AJAX » Bug #5744

Bug in PHP 5.1 RC1

Details

Submitted2005-10-21 16:11 UTC
Fromspam at electroteque dot org
StatusDuplicate
PackageHTML_AJAX
PHP Version5.1.0
OSn/a
Roadmaps(Not assigned)

Comments

[2005-10-21 16:11 UTC] spam at electroteque dot org

Description:
------------
Discovered a bug somehow this happened ??

Fatal error: Only variables can be passed by reference
in /Volumes/DATA/www/classes/PEAR/HTML/AJAX.php on line
280

function _getClientPayloadContentType() {
if (isset($_SERVER['CONTENT_TYPE'])) {
$type = $_SERVER['CONTENT_TYPE'];
if (strstr($type,';')) {
$type = array_shift(explode(';',$type));
}
return strtolower($type);
}
return 'text/plain';
}

fix is

function _getClientPayloadContentType() {
if (isset($_SERVER['CONTENT_TYPE'])) {
$type = $_SERVER['CONTENT_TYPE'];
if (strstr($type,';')) {
$type = explode(';',$type);
$type = array_shift($type);
}
return strtolower($type);
}
return 'text/plain';
}