Bug in PHP My admin on Ubuntu 18.04

I got this error every time I tried to query a table in PHPMyAdmin

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


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

Turns out there’s a but in the PHP My Admin version that comes with Ubuntu 18.04 running on PHP 7.2

You need to edit /usr/share/phpmyadmin/libraries/sql.lib.php

Replace: (count($analyzed_sql_results['select_expr'] == 1) With:(count($analyzed_sql_results['select_expr']) == 1


Screen Shot 2018-06-26 at 4.13.04 PM.png

Thanks StackOverflow!

  • Category: PHP

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.