From ee1ce0797084f38f4ed822d767bf5154601f9c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Sun, 9 Jul 2017 11:15:47 +0200 Subject: [PATCH] Fixed version check when not connected to a database MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #13437 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/VersionInformation.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 755c16ff6f..c6693252fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.7.3 (not yet released) - issue #13447 Large multi-line query removes Export operation and blanks query box options - issue #13445 Fixed rendering of query results +- issue #13437 Fixed version check when not connected to a database 4.7.2 (2017-06-29) - issue #13314 Make theme selection keep current server diff --git a/libraries/VersionInformation.php b/libraries/VersionInformation.php index 960f9618ad..33a08659bd 100644 --- a/libraries/VersionInformation.php +++ b/libraries/VersionInformation.php @@ -217,12 +217,16 @@ class VersionInformation } /** - * Returns the MySQL version + * Returns the MySQL version if connected to a database * * @return string MySQL version */ protected function getMySQLVersion() { - return PMA_MYSQL_STR_VERSION; + if (defined('PMA_MYSQL_STR_VERSION')) { + return PMA_MYSQL_STR_VERSION; + } else { + return null; + } } }