This is the test I'm running, where setting the subject is line 134 in the stacktrace.
public function test_mb_encode_mimeheader()
{
$CakeEmail = new CakeEmail();
$CakeEmail->subject('Cur abnoba studere?');
}
Stacktrace:
ErrorException : mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead, File: /var/www/html/vendors/symfony/polyfill-mbstring/Mbstring.php, Line: 134
/var/www/html/vendors/symfony/polyfill-mbstring/Mbstring.php:134
/var/www/html/vendors/symfony/polyfill-mbstring/bootstrap.php:21
/var/www/html/vendors/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php:1338
/var/www/html/vendors/cakephp/cakephp/lib/Cake/Network/Email/CakeEmail.php:691
/var/www/html/app/Test/Case/Controller/SystemControllerTest.php:29
/var/www/html/vendors/cakephp/cakephp/lib/Cake/TestSuite/CakeTestCase.php:82
/var/www/html/vendors/cakephp/cakephp/lib/Cake/TestSuite/CakeTestRunner.php:62
/var/www/html/vendors/cakephp/cakephp/lib/Cake/TestSuite/CakeTestSuiteCommand.php:98
I suppose the call to mb_encode_mimeheader in CakeEmail.php, line 1338 has to be replaced.
Edit:
Realized that symfony/polyfill-mbstring is a dependency of symfony/console which in turn is a dependency of phploc/phploc and sebastian/phpcpd so maybe I should post my issue elsewhere...
Installed php7.0-mbstring, fixed it :sweat:
Hi,
Is the php7.0-mbstring should be still mandatory? because I had similar issue on cakePHP 3.4.10, ubuntu 16.04,
Installing the package did fix the warning and the issue in the mail subject.
@kevanescence yes mbstring is still a requirement for CakePHP.
Most helpful comment
Installed php7.0-mbstring, fixed it :sweat: