Problem with phpMyAdmin and PHP 7.2: “Warning in ./libraries/sql.lib.php#613 count()

作者: JONE 分类: PHPer 发布时间: 2018-08-02 13:39
Warning in ./libraries/plugin_interface.lib.php#532
 count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/display_import.lib.php#350: PMA_pluginGetOptions(
 string 'Import',
 array,
 )
 ./libraries/display_import.lib.php#430: PMA_getHtmlForImportOptionsFormat(array)
 ./libraries/display_import.inc.php#58: PMA_getHtmlForImport(
 string '5b6297690fc26',
 string 'database',
 string 'www_domain_com',
 string '',
 integer 52428800,
 array,
 NULL,
 NULL,
 )
 ./db_import.php#23: require(./libraries/display_import.inc.php)

报错原因是因为

在php7.2下, count() 函数已经非常严格了.

count函数仅支持参数为数组, 非数组情况下将报警告

那么解决方法自然也就很简单 把运行phpMyAdmin的php环境切换到7.0版本即可。

参考链接:https://devanswers.co/problem-php-7-2-phpmyadmin-warning-in-librariessql-count/

发表评论

电子邮件地址不会被公开。 必填项已用*标注