sql.lib.php
This error is caused by a line of code in /usr/share/phpmyadmin/libraries/sql.lib.php.
If you don’t want to wait for the repositories to update with the latest version, it is strongly recommended that you manually upgrade to the latest version of phpMyAdmin yourself.
Alternatively, you can make a change to sql.lib.php to temporarily fix the error.
Firstly, backup sql.lib.php before editing.
sudo cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.bak Edit sql.lib.php in nano.
sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php Press CTRL + 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 CTRL + X, press Y and then press ENTER)
Import/Export issues
If you are also getting an error Warning in ./libraries/plugin_interface.lib.php#551 under import and export tabs:
Backup plugin_interface.lib.php
sudo cp /usr/share/phpmyadmin/libraries/plugin_interface.lib.php /usr/share/phpmyadmin/libraries/plugin_interface.lib.php.bak Edit plugin_interface.lib.php
sudo nano /usr/share/phpmyadmin/libraries/plugin_interface.lib.php Press CTRL + W and search for if (! is_null($options) && count($options) > 0) {
If not found, try search for if ($options != null && count($options) > 0)
Replace with if (! is_null($options) && count((array)$options) > 0) {
Save file and exit. (Press CTRL + X, press Y and then press ENTER)
Upgrading phpMyAdmin
You may be interested in an article I wrote on manually upgrading phpMyAdmin. Since the release of Ubuntu 18.04, the repositories have been slow to update with the latest version of phpMyAdmin causing many compatibility issues, so make sure you have the latest version:
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

Thanks !!!!!!!!!!!!
Perfect Fix! you are great..! love you
Thanks, you have been very helpful
Muito bom. Obrigado.
Muchas gracias.
Thank you so much!
Perfect! Star rock!!!
you rock dude, big thanks
Thank you for being so clear with you answers, and for covering multiple cases. You are a lifesaver.
Thanks!!!!
Perfect. Thank you very much.
Thanx x 1000000000 times.
🙂
You’re my GOD ^^
It work’s.
Thanks a lot for your help!
By God, it really works with Ubuntu 18.04 server, nginx, php 7.2, phpmydmin 4.6.6deb5 and mariadb 10.1.47.
Congratulations!!!
It is perfectly working in Linux mint 19
Thank you so much
Works like a charm. Thanks
Excellent! You save my life twice.
Thanks so much, it worked! I thought that the replies were bots.
Perfect. Thanks so much. Was getting this all the time when importing csv file. All sorted now.
Thank you very much. It is very helpful.
Amazing!!! it work in my rasberry pi 3 b+. Thank you very much!
Amazing runing smooth now.