Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
| From: | dex at pirho dot net | Date: | Wed, 02 Mar 2022 12:12:02 +0000 |
| Subject: | Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-240112@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=53251&edit=1
ID: 53251
Comment by: dex at pirho dot net
Reported by: jeanseb at au-fil-du dot net
Summary: bindtextdomain with null directory doesn't return
the previously set
Status: Closed
Type: Bug
Package: Gettext related
Operating System: Debian 5.0.6
PHP Version: 5.3.3
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thanks for your quick response! :)
PHP 8 it is then.
Previous Comments:
------------------------------------------------------------------------
[2022-03-02 12:08:32] cmb@php.net
> I'm running PHP Version 7.4.3 on Ubuntu 20.04.4 LTS.
The fix only targeted PHP 8.0 and higher. Since PHP 7.4 is no
longer actively supported[1], the fix won't be backported.
Consider to upgrade to PHP 8.
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2022-03-02 12:03:51] dex at pirho dot net
Additionally, bind_textdomain_codeset is not returning the currently set encoding.
bind_textdomain_codeset('strings', 'UTF-8');
echo bind_textdomain_codeset('strings', NULL);
This code returns '' (nothing at all).
The bind_textdomain_codeset manual entry
(https://www.php.net/manual/en/function.bind-textdomain-codeset.php) states 'The code set. If
null, the currently set encoding is returned.'
------------------------------------------------------------------------
[2022-03-02 11:58:34] dex at pirho dot net
This still isn't working. I'm running PHP Version 7.4.3 on Ubuntu 20.04.4 LTS.
bindtextdomain('strings', '/var/www/html/locale/');
echo bindtextdomain($domain, NULL);
This code returns '/var/www/html'.
The bindtextdomain manual entry (https://www.php.net/manual/en/function.bindtextdomain.php) states
'The directory path. If null, the currently set directory is returned.'
------------------------------------------------------------------------
[2021-01-25 14:45:30] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d319098b24342e9a4e2344dc7f588b74edcaa846
Log: Fix #53251: bindtextdomain with null dir doesn't return old value
------------------------------------------------------------------------
[2021-01-22 12:15:02] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #53251: bindtextdomain with null dir doesn't return old value
On GitHub: https://github.com/php/php-src/pull/6631
Patch: https://github.com/php/php-src/pull/6631.patch
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=53251
--
Edit this bug report at https://bugs.php.net/bug.php?id=53251&edit=1