From 4ab77dd13e106553a7c92d24aaa6799935517a8b Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 27 May 2015 09:59:30 +0200 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 file changed, 3 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php index ba7954e84..84d3787b9 100644 --- a/program/lib/Roundcube/bootstrap.php +++ b/program/lib/Roundcube/bootstrap.php @@ -99,8 +99,9 @@ if (!preg_match($regexp, $path)) { 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'); +} /**