Bug #76704 [NEW]: mb_detect_order return value varies based on argument type

From: Date: Sat, 04 Aug 2018 00:13:05 +0000
Subject: Bug #76704 [NEW]: mb_detect_order return value varies based on argument type
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216573@lists.php.net to get a copy of this message
From: smokey101stair at gmail dot com Operating system: Windows 10 PHP version: Irrelevant Package: mbstring related Bug Type: Bug Bug description:mb_detect_order return value varies based on argument type Description: ------------ The function mb_detect_order() can receive either a comma separated list of encodings or an array of encodings. However, its return value varies based on whether it is given a string or an array that contain the same values. Test script: --------------- https://3v4l.org/gJfAO Expected result: ---------------- mb_detect_order() should return the same value regardless of which type is used for the encoding_list parameter. HHVM seems to not be affected by this. Actual result: -------------- When given a string, mb_detect_order() will return true if it finds at least one supported encoding in the list. When given an array, mb_detect_order() will return false if it finds any non-supported encoding. -- Edit bug report at https://bugs.php.net/bug.php?id=76704&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76704&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76704&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76704&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76704&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76704&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76704&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76704&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76704&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76704&r=support Expected behavior: https://bugs.php.net/fix.php?id=76704&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76704&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76704&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76704&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76704&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76704&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76704&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76704&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76704&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76704&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76704&r=mysqlcfg

« previous php.bugs (#216573) next »