1. 程式人生 > >phpMyAdmin 的低階程式碼錯誤:括號配對

phpMyAdmin 的低階程式碼錯誤:括號配對

錯誤提示:

Warning in ./libraries/sql.lib.php#601
count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/sql.lib.php#2038: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#1984: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'alternativegirls',
string 'tgp_photo',
NULL,
NULL,

在 /usr/share/phpmyadmin/libraries/sql.lib.php,括號配對出了問題,610行附近:

count($analyzed_sql_results['select_expr'] == 1)

把它修改為:

(count($analyzed_sql_results['select_expr']) == 1)