|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15313 Error in HTTP::negotiateLanguage (with solution)
Submitted: 2002-01-31 07:44 UTC Modified: 2002-01-31 08:41 UTC
From: tfranz at moleman dot de Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.1.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
20 + 13 = ?
Subscribe to this entry?

 [2002-01-31 07:44 UTC] tfranz at moleman dot de
The part of the negotiateLanguage Function where the server's accepted languages are spitted into an arry uses only HTTP_ACCEPT_LANGUAGE which is not declared global (so there are no visible languages to explode)

Change the line from
$accepted = split(',[[:space:]]*', $HTTP_ACCEPT_LANGUAGE);


$accepted = split(',[[:space:]]*', $_SERVER['HTTP_ACCEPT_LANGUAGE']);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-31 08:41 UTC]
Fixed in CVS.

Thanks for your report.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 07:01:34 2024 UTC