Skip to content

Commit

Permalink
Do not call non-static method statically (PEAR::raiseError)
Browse files Browse the repository at this point in the history
Calling PEAR::raiseError() results in a deprecation warning (and thus CI
error) with PHP5.6.  An alternative fix would be to use a
PEAR_Exception, but I wasn't quite sure what to do with
$this->_pearErrorMode (Nominally, I'd have used PEAR::setErrorHandling,
but that ends up emitting the same deprecation warning, and simply
changing to an exception would have required more invasive changes to
all callers.

Signed-off-by: Nishanth Aravamudan <nish.aravamudan@canonical.com>
  • Loading branch information
Nishanth Aravamudan committed Jun 30, 2016
1 parent 86440ba commit 718ffac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cache/Lite.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ function lastModified()
function raiseError($msg, $code)
{
include_once('PEAR.php');
return PEAR::raiseError($msg, $code, $this->_pearErrorMode);
$pear = new PEAR();
return $pear->raiseError($msg, $code, $this->_pearErrorMode);
}

/**
Expand Down

0 comments on commit 718ffac

Please sign in to comment.