From 30bda361bfa5e7e00536881a31e19d2520f17f3b Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 1 Jan 2009 23:37:14 +0000 Subject: [PATCH] patch #2478940 [core] PHP 5.2+ warning does not work --- ChangeLog | 2 ++ libraries/common.inc.php | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c33d665b..bf0adda81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2445213 [export] Commas for CSV Excel 2008 for Mac - bug #2397877 [core] ForceSSL and http auth_type - bug #2473127 [display] Deleting rows displays tbl structure, not contents +- patch #2478940 [core] PHP 5.2+ warning does not work, + thanks to Jürgen Wind - windkiel 3.1.1.0 (2008-12-09) - patch #2242765 [core] Navi panel server links wrong, diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 522312de6..c7aa5189e 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -32,6 +32,14 @@ * @package phpMyAdmin */ +/** + * Minimum PHP version; can't call PMA_fatalError() which uses a + * PHP 5 function, so cannot easily localize this message. + */ +if (version_compare(PHP_VERSION, '5.2.0', 'lt')) { + die('PHP 5.2+ is required'); +} + /** * the error handler */ @@ -73,13 +81,7 @@ require_once './libraries/sanitizing.lib.php'; /** * the PMA_Theme class - * (this one is the first to produce a fatal error under PHP < 5) - * and let's put here the same minimum requirement as in our doc. */ -if (version_compare(PHP_VERSION, '5.2.0') < 0 ) { - PMA_fatalError('strUpgrade', array('PHP', '5.2')); -} - require_once './libraries/Theme.class.php'; /**