From cd8bcf3801226ab512cc6bd3fb65d9e4eaa7df54 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 24 Feb 2015 05:54:58 -0500
Subject: [PATCH] Fix "PHP Fatal error: Call to a member function getMessage() on a non-object"
---
program/lib/Roundcube/rcube_db.php | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index 1e6a206..ab7058f 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -1,6 +1,6 @@
<?php
-/**
+/*
+-----------------------------------------------------------------------+
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2005-2012, The Roundcube Dev Team |
@@ -1063,6 +1063,10 @@
*/
public function table_name($table, $quoted = false)
{
+ // let plugins alter the table name (#1489837)
+ $plugin = rcube::get_instance()->plugins->exec_hook('db_table_name', array('table' => $table));
+ $table = $plugin['table'];
+
// add prefix to the table name if configured
if (($prefix = $this->options['table_prefix']) && strpos($table, $prefix) !== 0) {
$table = $prefix . $table;
--
Gitblit v1.9.1