Mage.php中_toString()的Magento致命错误
致命错误:在第764行的/home/**/public\u html/**/app/Mage.php中的非对象上调用成员函数u toString(),下面是靠近第764行的代码Mage.php中_toString()的Magento致命错误,magento,Magento,致命错误:在第764行的/home/**/public\u html/**/app/Mage.php中的非对象上调用成员函数u toString(),下面是靠近第764行的代码 public static function logException(Exception $e) { if (!self::getConfig()) { return; } $file = self::getStoreConfig('dev/log/exception_file
public static function logException(Exception $e)
{
if (!self::getConfig()) {
return;
}
$file = self::getStoreConfig('dev/log/exception_file');
self::log("\n" . $e->__toString(), Zend_Log::ERR, $file);
}
显示致命错误的原因是什么?异常$e是字符串。它没有uuu toString()函数 您可以尝试以下方法:
print_r($e);
或
或
^^显示致命错误,因为$e不是对象。检查Mage::logException语句的自定义功能(模块)
var_dump($e);
$e->getMessage();