phpmyadmin sql.lib.ph error #613

phpmyadmin version 4.6.6deb5ubuntu0.5,其他版本不確定有沒有


錯誤訊息類似下面這樣,sql.lib.php 第613行噴錯

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

Backtrace

./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'vfdr',
string 'category',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `category`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'vfdr',
string 'category',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `category`',
NULL,
NULL,
)

看 sql.lib.php line #613 附近除錯

sudo nano +613 /usr/share/phpmyadmin/libraries/sql.lib.php
        &&((empty($analyzed_sql_results['select_expr']))
            || (count($analyzed_sql_results['select_expr'] == 1)
                && ($analyzed_sql_results['select_expr'][0] == '*')))

改成

        && ((empty($analyzed_sql_results['select_expr']))
            || (count($analyzed_sql_results['select_expr']) == 1 
                && ($analyzed_sql_results['select_expr'][0] == '*')))