From 52b256e85fbb7b88f0de05bfafb70b3e99b2f522 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 24 May 2013 08:30:07 +0200 Subject: Print nicer error message when too old PHP version found - required by mysql driver (#1489099) --- program/lib/Roundcube/rcube_db_mysql.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'program/lib/Roundcube/rcube_db_mysql.php') diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php index b2cbab271..2d42610b6 100644 --- a/program/lib/Roundcube/rcube_db_mysql.php +++ b/program/lib/Roundcube/rcube_db_mysql.php @@ -34,6 +34,13 @@ class rcube_db_mysql extends rcube_db */ protected function init() { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + rcube::raise_error(array('code' => 600, 'type' => 'db', + 'line' => __LINE__, 'file' => __FILE__, + 'message' => "MySQL driver requires PHP >= 5.3, current version is " . PHP_VERSION), + true, true); + } + // SQL identifiers quoting $this->options['identifier_start'] = '`'; $this->options['identifier_end'] = '`'; -- cgit v1.2.3