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

Backtrace

./libraries/sql.lib.php#2038: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#1984: PMA_executeQueryAndGetQueryResponse(
array,
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

 

Thanks StackOverflow!