|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tfranz at moleman dot de
New email:
PHP Version: OS:


 [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: Sun May 19 14:01:32 2024 UTC