From 4ab77dd13e106553a7c92d24aaa6799935517a8b Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Wed, 27 May 2015 03:59:30 -0400
Subject: [PATCH] Check for PEAR class before accessing it. With new composer modules this isn't necessary in the include path anymore

---
 program/lib/Roundcube/bootstrap.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index ba7954e..84d3787 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -99,8 +99,9 @@
 spl_autoload_register('rcube_autoload');
 
 // set PEAR error handling (will also load the PEAR main class)
-@PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'rcube_pear_error');
-
+if (class_exists('PEAR')) {
+    PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'rcube_pear_error');
+}
 
 
 /**

--
Gitblit v1.9.1