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

phpmyadmin v4.6.6 isn’t fully compatible with PHP 7.2, have an warning issue. On phpmyadmin v4.8 fixes this compatibility issue with php 7.2 To run phpmyadmin v4.6.6 with php 7.2 you will found this below warning

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 'dbdbdb',
string 'ap_dbdb',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `ap_dbdb`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'dbdbdb',
...
...
...
...

Those warning message tell that, there have an issue on 613 number of line of this file /usr/share/phpmyadmin/libraries/sql.lib.php

So let’s go to edit that file and reach on 613 lines.

|| (count($analyzed_sql_results['select_expr'] == 1)
Replace this line to 
|| (count($analyzed_sql_results['select_expr']) == 1

For details, check here Github