Bug #73730 [NEW]: textdomain(null) throws a TypeError when strict_types is declared
| From: | enhanced dot ttssd+php at gmail dot com | Date: | Tue, 13 Dec 2016 07:29:43 +0000 |
| Subject: | Bug #73730 [NEW]: textdomain(null) throws a TypeError when strict_types is declared | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-205949@lists.php.net to get a copy of this message | ||
From: enhanced dot ttssd+php at gmail dot com
Operating system: CentOS Linux release 7.2.1511 (C
PHP version: 7.0.14
Package: Gettext related
Bug Type: Bug
Bug description:textdomain(null) throws a TypeError when strict_types is declared
Description:
------------
textdomain(null) throws a TypeError when strict_types is declared.
Doc:
https://secure.php.net/manual/en/function.textdomain.php#refsect1-function.textdomain-parameters
> Parameters
> text_domain
> The new message domain, or NULL to get the current setting without
changing it
Without strict_types, it works fine(returns current setting).
Test script:
---------------
<?php
declare(strict_types=1);
var_dump(textdomain(null));
https://3v4l.org/BRUYj
https://3v4l.org/eCF0b
Expected result:
----------------
string(8) "messages"
Actual result:
--------------
PHP Fatal error: Uncaught TypeError: textdomain() expects parameter 1
to be string, null given
--
Edit bug report at https://bugs.php.net/bug.php?id=73730&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73730&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73730&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73730&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73730&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73730&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73730&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73730&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73730&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73730&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73730&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73730&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73730&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73730&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73730&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73730&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73730&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73730&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73730&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73730&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73730&r=mysqlcfg