fatal error :在/home/**/public_html/**/app/Mage.php 第 764 行及以下的非对象上调用成员函数 __toString()靠近764行的代码
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);
}
显示 fatal error 的任何原因?
最佳答案
异常 $e 是字符串。它没有 __toString() 函数。
您可以尝试使用:
print_r($e);
或
var_dump($e);
或
$e->getMessage();
^^
关于Mage.php 中 __toString() 的 Magento fatal error ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10310415/