php.net |  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
 [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);

into

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Thanks for your report.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC