我遇到了这个问题。我的 php 版本是7.2。实际上这个错误来自 phpmyadmin 库。该库是 /usr/share/phpmyadmin/libraries/sql.lib.php。在这个文件第614行。所以需要修改文件
来自&& ($analyzed_sql_results['select_expr'][0] == '*')))
到 && ($analyzed_sql_results['select_expr'][0] == '*'))
或者您可以替换下面的完整方法:
/**
* Function to check whether to remember the sorting order or not
*
* @param array $analyzed_sql_results the analyzed query and other variables set
* after analyzing the query
*
* @return boolean
*/
function PMA_isRememberSortingOrder($analyzed_sql_results)
{
return $GLOBALS['cfg']['RememberSorting']
&& ! ($analyzed_sql_results['is_count']
|| $analyzed_sql_results['is_export']
|| $analyzed_sql_results['is_func']
|| $analyzed_sql_results['is_analyse'])
&& $analyzed_sql_results['select_from']
&& ((empty($analyzed_sql_results['select_expr']))
|| (count($analyzed_sql_results['select_expr']) == 1)
&& ($analyzed_sql_results['select_expr'][0] == '*'))
&& count($analyzed_sql_results['select_tables']) == 1;
}
我希望这可能会有所帮助。谢谢你。