From:             php at fimbul dot net
Operating system: Linux (Debian unstable)
PHP version:      4.3.10
PHP Bug Type:     Gettext related
Bug description:  Unexpected output from textdomain()

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 bug report at http://bugs.php.net/?id=32201&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32201&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32201&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32201&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32201&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32201&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32201&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32201&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32201&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32201&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32201&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32201&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32201&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32201&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32201&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32201&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32201&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32201&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32201&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32201&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32201&r=mysqlcfg

Reply via email to