is there anyway to call a non static method, as an static method?
I have found this call:
$handler =& ProfileHandler_Array::getInstance(
array( 'username' => $this->api_username,
'certificateFile' => $this->api_certificate,
'signature' => $this->api_signature,
'subject' => $this->api_subject,
'environment' => (($t开发者_高级运维his->api_test)?'Sandbox':'Live')
)
And here you have getInstance() method:
function getInstance($id, &$handler)
{
$classname = __CLASS__;
$inst = new $classname($id, $handler);
$result = $inst->_load();
if (PayPal::isError($result)) {
return $result;
}
$result = $inst->loadEnvironments();
if (PayPal::isError($result)) {
return $result;
}
return $inst;
}
and it doesn't give any errors!!!!
More clues: it's maybe an old code.
Regards
Your code should give an error, it just isn't displayed. (Is error_reporting
set to E_ALL | E_STRICT
? Is display_errors
enabled?)
From the manual:
Calling non-static methods statically generates an
E_STRICT
level warning.
精彩评论