Home » HTML » HTML_AJAX » Bug #5744
Bug in PHP 5.1 RC1
Details
| Submitted | 2005-10-21 16:11 UTC |
|---|---|
| From | spam at electroteque dot org |
| Status | Duplicate |
| Package | HTML_AJAX |
| PHP Version | 5.1.0 |
| OS | n/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';
}