phpmyadmin: Parameter must be an array or an object ...
Posted: Tue Dec 08, 2020 12:12 am
[PROBLEM]
Using default phpmyadmin with default mysql on Ubuntu 18.04.4 server, I get the following warning when opening a database and selecting the option "Import":
[SOLUTION]
I remember I already had and fixed this in the past, but I don't find any notes here on the forum...
Ah, here it is:
1) Error in phpmyadmin Warning in ./libraries/plugin_interface.lib.php#551
Patch summary - Edit the following files in "/usr/share/phpmyadmin/libraries":
Then restart apache:
Using default phpmyadmin with default mysql on Ubuntu 18.04.4 server, I get the following warning when opening a database and selecting the option "Import":
Warning in ./libraries/plugin_interface.lib.php#551
count(): Parameter must be an array or an object that implements Countable
Backtrace
./libraries/display_import.lib.php#371: PMA_pluginGetOptions(
string 'Import',
array,
)
./libraries/display_import.lib.php#456: PMA_getHtmlForImportOptionsFormat(array)
./libraries/display_import.lib.php#691: PMA_getHtmlForImport(
string '5fcea82cb224e',
string 'database',
string 'ca_filmdb',
string '',
integer 134217728,
array,
NULL,
NULL,
string '',
)
./db_import.php#43: PMA_getImportDisplay(
string 'database',
string 'ca_filmdb',
string '',
integer 134217728,
)
[SOLUTION]
I remember I already had and fixed this in the past, but I don't find any notes here on the forum...
Ah, here it is:
1) Error in phpmyadmin Warning in ./libraries/plugin_interface.lib.php#551
Patch summary - Edit the following files in "/usr/share/phpmyadmin/libraries":
Code: Select all
--- plugin_interface.lib.php 2020-12-07 22:13:38.036457999 +0000
+++ plugin_interface.lib.php.org 2017-01-23 19:20:26.000000000 +0000
@@ -548,7 +548,7 @@
$ret .= '<h3>' . PMA_getString($text) . '</h3>';
$no_options = true;
- if ($options != null && count((array)$options) > 0) {
+ if ($options != null && count($options) > 0) {
foreach ($options->getProperties()
as $propertyMainGroup
) {
Then restart apache:
Code: Select all
$ sudo systemctl restart apache2