From 3e0ad293e118a078d227ca15aaab7cf6cbdb0851 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 18 Feb 2015 07:30:48 -0500
Subject: [PATCH] Fix PHP fatal error when visiting Vacation interface and there's no sieve script yet

---
 plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
index d412e17..69ae4b8 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
@@ -2344,12 +2344,12 @@
      */
     protected function init_script()
     {
-        $this->script = $this->sieve->script->as_array();
-
-        if (!$this->script) {
+        if (!$this->sieve->script) {
             return;
         }
 
+        $this->script = $this->sieve->script->as_array();
+
         $headers    = array();
         $exceptions = array('date', 'currentdate', 'size', 'body');
 

--
Gitblit v1.9.1