ID:               32201
 Updated by:       [EMAIL PROTECTED]
-Summary:          Unexpected output from textdomain()
 Reported By:      php at fimbul dot net
-Status:           Open
+Status:           Verified
-Bug Type:         Gettext related
+Bug Type:         Documentation problem
 Operating System: Linux (Debian unstable)
 PHP Version:      4.3.10
 New Comment:

>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.



Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to