ID: 32201
Updated by: [EMAIL PROTECTED]
Reported By: php at fimbul dot net
-Status: Verified
+Status: Closed
Bug Type: Documentation problem
Operating System: Linux (Debian unstable)
PHP Version: 4.3.10
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:
------------------------------------------------------------------------
[2005-03-06 15:40:29] [EMAIL PROTECTED]
>From the GNU gettext manpage:
"If successful, the textdomain function returns the current
message domain, after possibly changing it."
As the PHP function is merely a wrapper to this gettext function, this
is a documentation problem. Reclassified as such.
------------------------------------------------------------------------
[2005-03-06 02:58:50] php at fimbul dot net
Description:
------------
>From the documentation:
string textdomain ( string text_domain )
This function sets the domain to search within when calls are made to
gettext(), usually the named after an application. The previous default
domain is returned. Call it with NULL as parameter to get the current
setting without changing it.
What actually happens:
This function sets the domain to search within when calls are made to
gettext(), usually the named after an application. The current default
domain is returned, i.e. the domain just set. Call it with NULL as
parameter to get the current setting without changing it.
Reproduce code:
---------------
<?php
// Let's assume that the current default domain is 'A'
echo textdomain(NULL);
echo $orig = textdomain('B');
echo textdomain(NULL);
echo textdomain('C');
echo textdomain(NULL);
echo textdomain($orig);
echo textdomain(NULL);
?>
Expected result:
----------------
AABBCCA
Actual result:
--------------
ABBCCBB
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32201&edit=1