Bug #80626 [NEW]: Passing 'pass' to mb_convert_encoding()'s $from_encoding not working since 7.3
From: powtac at gmx dot de
Operating system: Linux
PHP version: 7.4.14
Package: Documentation problem
Bug Type: Bug
Bug description:Passing 'pass' to mb_convert_encoding()'s $from_encoding not working
since 7.3
Description:
------------
According to the docs 'pass' is an option for the third parameter of
mb_convert_encoding() (https://php.net/function.mb-convert-encoding),
see https://www.php.net/manual/en/mbstring.supported-encodings.php
where
it says:
"Any php.ini entry which accepts an encoding name can also use the
values "auto" and "pass". mbstring functions which accept an encoding
name can also use the value "auto". If "pass" is set, no character
encoding conversion is performed."
But actually an Warning occurs when using 'pass' at
mb_convert_encoding() from PHP 7.3, it used to work without Warning
before PHP 7.3.
See https://3v4l.org/fbRiW#output
Test script:
---------------
<?php
// https://3v4l.org/fbRiW#output
echo mb_convert_encoding('a', 'UTF-8', 'pass');
?>
Expected result:
----------------
No warning should occur or the docs need to be adjusted for the 'pass'
parameter.
Actual result:
--------------
Warning: mb_convert_encoding(): Unable to create character encoding
converter in ... on line ...
--
Edit bug report at https://bugs.php.net/bug.php?id=80626&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80626&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80626&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80626&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80626&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80626&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80626&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80626&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80626&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80626&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80626&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80626&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80626&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80626&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80626&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80626&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80626&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80626&r=mysqlcfg
Thread (3 messages)
- powtac at gmx dot de