Problem with phpMyAdmin and PHP 7.2: “Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable”
If you don’t want to wait for the repositories to update with the latest version, you can manually upgrade to the latest version of phpMyAdmin yourself.
Alternatively, you can make a small change to
sql.lib.php to fix the error.
sql.lib.php before editing.
sudo cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.bak
sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php
W and search for
(count($analyzed_sql_results['select_expr'] == 1)
Replace it with
((count($analyzed_sql_results['select_expr']) == 1)
Save file and exit. (Press
Y and then press
Note that this is just a temporary fix and other compatibility issues may crop up until you update phpMyAdmin to the latest version.
If you are also getting an error
Warning in ./libraries/plugin_interface.lib.php#551under import and export tabs, see comments below.
source : https://devanswers.co/problem-php-7-2-phpmyadmin-warning-in-librariessql-count/