From cb18ec2320592a7adba33187ad139772eef04c45 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 21 Jan 2015 11:13:44 +0530 Subject: [PATCH] bug #4700 Error text: Internal Server Error Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + libraries/Response.class.php | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 053e76dda1..e4f56c0bc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog - bug #4714 Forced ORDER BY for own sql statements - bug #4721 Undefined property: stdClass::$version - bug #4719 'only_db' not working +- bug #4700 Error text: Internal Server Error 4.3.7.0 (2015-01-15) - bug #4694 js error on marking table as favorite in Safari (in private mode) diff --git a/libraries/Response.class.php b/libraries/Response.class.php index 4dc0feb4b7..bf41cca85b 100644 --- a/libraries/Response.class.php +++ b/libraries/Response.class.php @@ -303,14 +303,16 @@ class PMA_Response // bug, contact Edward Cheng $this->addJSON('_title', $this->getHeader()->getTitleTag()); - $menuHash = $this->getHeader()->getMenu()->getHash(); - $this->addJSON('_menuHash', $menuHash); - $hashes = array(); - if (isset($_REQUEST['menuHashes'])) { - $hashes = explode('-', $_REQUEST['menuHashes']); - } - if (! in_array($menuHash, $hashes)) { - $this->addJSON('_menu', $this->getHeader()->getMenu()->getDisplay()); + if (isset($GLOBALS['dbi'])) { + $menuHash = $this->getHeader()->getMenu()->getHash(); + $this->addJSON('_menuHash', $menuHash); + $hashes = array(); + if (isset($_REQUEST['menuHashes'])) { + $hashes = explode('-', $_REQUEST['menuHashes']); + } + if (! in_array($menuHash, $hashes)) { + $this->addJSON('_menu', $this->getHeader()->getMenu()->getDisplay()); + } } $this->addJSON('_scripts', $this->getHeader()->getScripts()->getFiles());