I’m getting this error:
Declaration of PayPal::raiseError()
should be compatible with that of
PEAR::raiseError()
These are PEAR::raiseError() and PayPal::raiseError() respectively:
function &raiseError($message = null,
$code = null,
$mode = null,
$options = null,
$userinfo = null,
$error_class = null,
$skipmsg = false)
{
class PayPal extends PEAR
{
function raiseError($message, $code = null)
{
return parent::raiseError($message, $code, null, null, null, 'PayPal_Error');
}
Any way to make it work without modifying the definitions?
I read here about the order the class are loaded. Could that be the problem?
The problem has nothing to do with the order in which classes are loaded. Since
PayPalextendsPEAR, any function that would take aPEARobject as parameter actually might be given aPayPalobject. And since thePEARmethodraiseError()allows up to seven parameters, thePayPalmethod should also allow at least up to seven parameters.The best solution would be to refactor
raiseError()inPayPal: