Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #5581 negotiateLanguage() throws fatal error in PHP 5
Submitted: 2005-10-02 14:13 UTC Modified: 2005-10-04 04:10 UTC
From: mako at mako-home dot de Assigned: mike
Status: Closed Package: HTTP
PHP Version: 5 OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-10-02 14:13 UTC] mako at mako-home dot de
Description: ------------ Calling HTTP::negotiateLanguage() throws an error: "Fatal error: Only variables can be passed by reference in HTTP.php on line 137" Changing line 137 to $matches = array_keys($matches); return $supp[array_pop($matches)]; fixes the error. Test script: --------------- <?php require_once("HTTP.php"); $strLang = HTTP::negotiateLanguage(array("de", "en", "fr"), "de"); echo $strLang; ?> Expected result: ---------------- Should output the negotiated language, e.g. "de" Actual result: -------------- "Fatal error: Only variables can be passed by reference in HTTP.php on line 137"

Comments

 [2005-10-04 04:10 UTC] mike
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.