From d61d668b64c44fc046095b807834c4836a8c05c5 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 08 Apr 2015 02:57:21 -0400
Subject: [PATCH] Remove useless code

---
 program/lib/Roundcube/rcube_cache.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/rcube_cache.php b/program/lib/Roundcube/rcube_cache.php
index 52a2db9..303abda 100644
--- a/program/lib/Roundcube/rcube_cache.php
+++ b/program/lib/Roundcube/rcube_cache.php
@@ -605,8 +605,10 @@
             $this->max_packet = 2097152; // default/max is 2 MB
 
             if ($this->type == 'db') {
-                $value = $this->db->get_variable('max_allowed_packet', $this->max_packet);
-                $this->max_packet = max($value, $this->max_packet) - 2000;
+                if ($value = $this->db->get_variable('max_allowed_packet', $this->max_packet)) {
+                    $this->max_packet = $value;
+                }
+                $this->max_packet -= 2000;
             }
             else if ($this->type == 'memcache') {
                 $stats = $this->db->getStats();

--
Gitblit v1.9.1