#48571 [Opn->Csd]: Error in code example
| From: | danbrown@php.net | Date: | Tue, 16 Jun 2009 18:51:28 +0000 |
| Subject: | #48571 [Opn->Csd]: Error in code example | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2366@lists.php.net to get a copy of this message | ||
ID: 48571
Updated by: danbrown@php.net
Reported By: a dot schilder at gmx dot net
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: irrelevant
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-06-16 18:43:31] a dot schilder at gmx dot net
Description:
------------
In the examples for
locale_accept_from_http
Locale::acceptFromHttp
the brackets for the $_SERVER variable are wrong.
Reproduce code:
---------------
The current example:
<?php
$locale = locale_accept_from_http($_SERVER('HTTP_ACCEPT_LANGUAGE'));
echo $locale;
?>
<?php
$locale = Locale::acceptFromHttp($_SERVER('HTTP_ACCEPT_LANGUAGE'));
echo $locale;
?>
Expected result:
----------------
correct example, no error
Actual result:
--------------
wrong example, error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48571&edit=1