|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80626 Passing 'pass' to mb_convert_encoding()'s $from_encoding not working since 7.3
Submitted: 2021-01-14 18:39 UTC Modified: 2021-01-24 04:22 UTC
From: powtac at gmx dot de Assigned:
Status: No Feedback Package: mbstring related
PHP Version: 7.4.14 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-01-14 18:39 UTC] powtac at gmx dot de
According to the docs 'pass' is an option for the third parameter of mb_convert_encoding() (, see 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.


Test script:
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 ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-14 18:45 UTC]
-Status: Open +Status: Feedback -Type: Bug +Type: Documentation Problem -Package: Documentation problem +Package: mbstring related
 [2021-01-14 18:45 UTC]
Were the docs changed at the same time as 7.3.0? Because according to what it says now, "pass" is only allowed for a php.ini setting. It means not to perform any conversion at all, and it doesn't make sense to support that in normal function calls.
 [2021-01-24 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 13 13:01:23 2021 UTC