summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-24 08:30:07 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-24 08:32:23 +0200
commit62766c9665df3c0c01831fc1aca09e2e600ffffe (patch)
treeae58a9fb8ebf96642131f880fb4c98834f8bbbef /program/lib/Roundcube
parent2f39634b0a31ce4d764c0e44b4eb2dcc144b3a4a (diff)
Print nicer error message when too old PHP version found - required by mysql driver (#1489099)
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_db_mysql.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php
index de81ede98..7f5ad2b36 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'] = '`';