Ubuntu 18.04 Phpmyadmin Ошибка после обновления с ОС 16.04 до 18.04 - PullRequest
0 голосов
/ 12 сентября 2018

После обновления моей ОС с Ubuntu 16.04 до 18.04 я постоянно получаю эту ошибку, когда нажимаю в меню импорта и экспорта в phpmyadmin. Моя полная ошибка из меню экспорта:

Warning in ./libraries/plugin_interface.lib.php#551
 count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/display_export.lib.php#381: PMA_pluginGetOptions(
string 'Export',
array,
)
./libraries/display_export.lib.php#883: PMA_getHtmlForExportOptionsFormat(array)
./libraries/display_export.lib.php#1099: PMA_getHtmlForExportOptions(
string 'server',
string '',
string '',
string '<div><a href="#" onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">Select all</a> / <a href="#" onclick="setSelectOptions(\'dump\', \'db_select[]\', false); return false;">Unselect all</a><br /><select name="db_select[]" id="db_select" size="10" multiple="multiple"> <option value="bengal_v2" selected="selected">bengal_v2</option> <option value="co_hr" selected="selected">co_hr</option> <option value="da_hr" selected="selected">da_hr</option> <option value="dart" selected="selected">dart</option> <option value="ffl_erp" selected="selected">ffl_erp</option> <option value="ffl_hr" selected="selected">ffl_hr</option> <option value="fjl_hr" selected="selected">fjl_hr</option> <option value="hrBlank" selected="selected">hrBlank</option> <option value="jcl_wash" selected="selected">jcl_wash</option> <option value="mailserver" selected="selected">mailserver</option> <option value="mm_college" selected="selected">mm_college</option> <option value="mmc" selected="selected">mmc</option> <option value="phpmyadmin" selected="selected">phpmyadmin</option> <option value="right_link" selected="selected">right_link</option> <option value="store" selected="selected">store</option> <option value="test" selected="selected">test</option> <option value="user_access" selected="selected">user_access</option> </select></div>',
integer 0,
array,
integer 0,
)
./server_export.php#47: PMA_getExportDisplay(
string 'server',
string '',
string '',
string '',
integer 0,
integer 0,
string '<div><a href="#" onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">Select all</a> / <a href="#" onclick="setSelectOptions(\'dump\', \'db_select[]\', false); return false;">Unselect all</a><br /><select name="db_select[]" id="db_select" size="10" multiple="multiple"> <option value="bengal_v2" selected="selected">bengal_v2</option> <option value="co_hr" selected="selected">co_hr</option> <option value="da_hr" selected="selected">da_hr</option> <option value="dart" selected="selected">dart</option> <option value="ffl_erp" selected="selected">ffl_erp</option> <option value="ffl_hr" selected="selected">ffl_hr</option> <option value="fjl_hr" selected="selected">fjl_hr</option> <option value="hrBlank" selected="selected">hrBlank</option> <option value="jcl_wash" selected="selected">jcl_wash</option> <option value="mailserver" selected="selected">mailserver</option> <option value="mm_college" selected="selected">mm_college</option> <option value="mmc" selected="selected">mmc</option> <option value="phpmyadmin" selected="selected">phpmyadmin</option> <option value="right_link" selected="selected">right_link</option> <option value="store" selected="selected">store</option> <option value="test" selected="selected">test</option> <option value="user_access" selected="selected">user_access</option> </select></div>',
)

Я попытался заменить count($analyzed_sql_results['select_expr'] == 1) на (count($analyzed_sql_results['select_expr']) == 1) в /usr/share/phpmyadmin/libraries/sql.lib.php файле. но все равно безуспешно.

1 Ответ

0 голосов
/ 12 октября 2018

В строке 551 /usr/share/phpmyadmin/libraries/plugin_interface.lib.php просто замените

if($options != null && count($options) > 0){

на

if ($options != null && (is_array($options) || $options instanceof Countable) && count($options) > 0) {
...