On 11/05/2010 11:06 PM, Gerry Reno wrote:
> In PHP 5.2.4 (my version) the gettext bindtextdomain function is not
> returning the existing directory settings when the directory argument is
> NULL.
> That is the expected behavior for bindtextdomain with GNU and it works
> this way elsewhere such as in python.
> With PHP what happens is that is just returns the current directory
> rather than the existing bindtextdomain directory setting.
>
> PHP EXAMPLE:
> bindtextdomain("messages", "./locale");
> textdomain("messages");
>
> print bindtextdomain("messages",NULL)."\n";
> print textdomain(NULL)."\n";
>
> ACTUAL: (incorrect)
> # php test.php
> /var/www/htdocs
> messages
>
> EXPECTED:
> # php test.php
> ./locale
> messages
>
> Can PHP gettext bindtextdomain be fixed to correctly return the existing
> setting when called with a NULL directory argument?
PHP of course just calls GNU textdomain() and you see the result the original
function returns,
not some PHP-specific result.
And no, I cannot reproduce this with PHP 5.3.4-dev or PHP 5.2.15-dev.
You might want to update your PHP and try again.
If you're still able to reproduce it - make sure the problem doesn't appear
to be in some distro-specific patch, i.e. get the original source tarball
from php.net and check if the problem actually exists there.
After that you're welcome to fill a bug-report.
--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php