Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpMyadmin error "continue" targeting switch is equivalent to "break"

After I installed the latest version of PHP 7.3.4 and MySQL Community Server 8.0.15 I faced this error on my phpmyadmin 4.7.7:

Warning in .\libraries\config\FormDisplay.php#661 "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Backtrace

.\vendor\composer\ClassLoader.php#444: include() .\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'F:\apps\phpMyAdmin\vendor\composer/../../\libraries\config\FormDisplay.php') Composer\Autoload\ClassLoader->loadClass(string 'PMA\libraries\config\FormDisplay') .\libraries\config\PageSettings.php#76: spl_autoload_call(string 'PMA\libraries\config\FormDisplay') .\libraries\config\PageSettings.php#230: PMA\libraries\config\PageSettings->__construct( string 'Navi_panel', string 'pma_navigation_settings', ) .\libraries\navigation\Navigation.php#66: PMA\libraries\config\PageSettings::getNaviSettings() .\libraries\Header.php#425: PMA\libraries\navigation\Navigation->getDisplay() .\libraries\Response.php#260: PMA\libraries\Header->getDisplay() .\libraries\Response.php#273: PMA\libraries\Response->_getDisplay() .\libraries\Response.php#432: PMA\libraries\Response->_htmlResponse() PMA\libraries\Response->response()

Anybody know how to fix this issue?

like image 984
Payam Khaninejad Avatar asked May 11 '19 16:05

Payam Khaninejad


2 Answers

Edit PHP script in the file FormDisplay.php At this line 660, I found this code in this path

$ /usr/share/phpmyadmin/libraries/config/FormDisplay.php

enter image description here

case 'select':
     $successfully_validated = $this->_validateSelect(
     $_POST[$key],
     $form->getOptionValueList($system_path)
     );
     if (! $successfully_validated) {
         $this->_errors[$work_path][] = __('Incorrect value!');
         $result = false;
         continue;
    }
    break;

Update it as per below suggestion

case 'select':
     $successfully_validated = $this->_validateSelect(
     $_POST[$key],
     $form->getOptionValueList($system_path)
     );
     if (! $successfully_validated) {
         $this->_errors[$work_path][] = __('Incorrect value!');
         $result = false;
         break;
    }
    break;

enter image description here

Reload PHPMyAdmin and your issue will get resolved.

like image 74
Jenish Avatar answered Sep 18 '22 18:09

Jenish


I had the same, and fixed it by editing the php script FormDisplay.php.

On line 661, replace continue with break (keep the semi-colon).

If you do edit, you'll need sudo access, but back up the original one first.

Reload the page. Hope that helps.

like image 34
MonsieurTechnical Avatar answered Sep 19 '22 18:09

MonsieurTechnical