Bug #80148 [NEW]: ctype_* functions silently return false for unsupported types
| From: | d dot penning at stroeermediabrands dot de | Date: | Fri, 25 Sep 2020 09:27:42 +0000 |
| Subject: | Bug #80148 [NEW]: ctype_* functions silently return false for unsupported types | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-229209@lists.php.net to get a copy of this message | ||
From: d dot penning at stroeermediabrands dot de
Operating system:
PHP version: 7.2.33
Package: Unknown/Other Function
Bug Type: Bug
Bug description:ctype_* functions silently return false for unsupported types
Description:
------------
According to the documentation the ctype functions only accept strings
as arguments. Passing any type that is not supported only returns false
and does not throw any warning or TypeError. Setting
declare(strict_types = 1); also has no effect on this.
Test script:
---------------
ctype_digit(1);
Expected result:
----------------
A warning or error hinting that an unsupported type was passed to a
ctype function.
Actual result:
--------------
false
--
Edit bug report at https://bugs.php.net/bug.php?id=80148&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80148&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80148&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80148&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80148&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80148&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80148&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80148&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80148&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80148&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80148&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80148&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80148&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80148&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80148&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80148&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80148&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80148&r=mysqlcfg