当我单击导出时,phpmyadmin 中会发生此错误

./../../php/tcpdf/include/tcpdf_fonts.php#1671 中的警告 chr() 期望参数 1 为 int,给定字符串

回溯

tcpdf_fonts.php#1671: chr(string '') tcpdf_fonts.php#1803: TCPDF_FONTS::unichr( string '', boolean true, ) tcpdf_fonts.php#2095: TCPDF_FONTS::UTF8ArrSubString( array, integer 0, integer 1, boolean true, ) tcpdf.php#1960: TCPDF_FONTS::utf8Bidi(array, string '', boolean false, boolean true, NULL, ) ./libraries/classes/Pdf.php#50: TCPDF->__construct( string 'L ',字符串 'pt',字符串 'A3',布尔值 true,字符串 'UTF-8',布尔值 false,布尔值 false,) ./libraries/classes/Plugins/Export/Helpers/Pdf.php#58: PhpMyAdmin\Pdf ->__construct(字符串'L',字符串'pt',字符串'A3',布尔真,字符串'UTF-8',布尔假,布尔假,)./libraries/classes/Plugins/Export/ExportPdf.php# 70:PhpMyAdmin\Plugins\Export\Helpers\Pdf->__construct(字符串'L',字符串'pt',字符串'A3',)./libraries/classes/Plugins/Export/ExportPdf.php#55:PhpMyAdmin\Plugins\Export \ExportPdf->initSpecificVariables()在此处输入图像描述 ./libraries/classes/Plugins.php#99: PhpMyAdmin\Plugins\Export\ExportPdf->__construct() ./libraries/classes/Display/Export.php#677: PhpMyAdmin\Plugins::getPlugins( string 'export', string 'libraries/classes/Plugins/Export/', array, ) ./db_export.php#147: PhpMyAdmin\Display\Export->getDisplay( string 'database', string 'wordpress', string '', string '', integer 14, integer 0, string 'TablesStructureDataSelect all wp_commentmetawp_commentswp_linkswp_optionswp_postmetawp_postswp_termmetawp_termswp_term_relationshipswp_term_taxonomywp_usermetawp_userswp_yoast_seo_linkswp_yoast_seo_meta ', )

http://img4.mukewang.com/6342b7860001f5ef23241118.jpg

慕无忌1623718
浏览 104回答 3
3回答

桃花长相依

运行此命令:sudo nano +1671 /usr/share/php/tcpdf/include/tcpdf_fonts.phpis_numeric($c)在公共方法主体中添加此条件,因此更改:public static function unichr($c, $unicode=true) {&nbsp; &nbsp; if (!$unicode) {&nbsp; &nbsp; &nbsp; &nbsp; return chr($c);&nbsp; &nbsp; } elseif ($c <= 0x7F) {&nbsp; &nbsp; &nbsp; &nbsp; // one byte&nbsp; &nbsp; &nbsp; &nbsp; return chr($c);&nbsp; &nbsp; } elseif ($c <= 0x7FF) {&nbsp; &nbsp; &nbsp; &nbsp; // two bytes&nbsp; &nbsp; &nbsp; &nbsp; return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F);&nbsp; &nbsp; } elseif ($c <= 0xFFFF) {&nbsp; &nbsp; &nbsp; &nbsp; // three bytes&nbsp; &nbsp; &nbsp; &nbsp; return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);&nbsp; &nbsp; } elseif ($c <= 0x10FFFF) {&nbsp; &nbsp; &nbsp; &nbsp; // four bytes&nbsp; &nbsp; &nbsp; &nbsp; return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);&nbsp; &nbsp; } else {&nbsp; &nbsp; &nbsp; &nbsp; return '';&nbsp; &nbsp; }}至public static function unichr($c, $unicode=true) {&nbsp; &nbsp; if (is_numeric($c)){&nbsp; &nbsp; &nbsp; &nbsp; if (!$unicode) {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return chr($c);&nbsp; &nbsp; &nbsp; &nbsp; } elseif ($c <= 0x7F) {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // one byte&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return chr($c);&nbsp; &nbsp; &nbsp; &nbsp; } elseif ($c <= 0x7FF) {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // two bytes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F);&nbsp; &nbsp; &nbsp; &nbsp; } elseif ($c <= 0xFFFF) {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // three bytes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);&nbsp; &nbsp; &nbsp; &nbsp; } elseif ($c <= 0x10FFFF) {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // four bytes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return chr(0xF0 | $c >> 18).chr(0x80 | $c >> 12 & 0x3F).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F);&nbsp; &nbsp; &nbsp; &nbsp; } else {&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return '';&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; }}

小怪兽爱吃肉

我已经解决了这个问题,我只是升级了 PHPMyAdmin 和 MYSQL 最新版本。

宝慕林4294392

一种快速的解决方案是降级您的 PHP 版本,假设您在 PHP 7.4 上运行。或者参考这个 URL&nbsp;https://github.com/tecnickcom/TCPPDF/pull/123/commits/34eb0dff48eb0b0d5f38f4cfd92ef6d47aefc8b4使用 TCPDF 修复了此错误
打开App,查看更多内容
随时随地看视频慕课网APP