12

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?

1
  • This is probably an issue with a non backward-compatible change in PHP. I would advice you to update to the latest version of PHPMyAdmin. Commented May 11, 2019 at 16:38

3 Answers 3

13

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.

Sign up to request clarification or add additional context in comments.

Comments

11

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.

2 Comments

this works, but -1 because an update to the new version is a better solution
still relevant in 10.3.22-MariaDB and PHP version: 7.3.14 running on Raspbian Buster 4.19.97
5

This error occurs by PHP backward-compatible.

Updating to the latest version, for me was 4.8.5 resolved the issue.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.