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 19:13 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 19: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 09:10 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!