【发布时间】:2015-09-05 08:17:28
【问题描述】:
我正在尝试在 Magento 应用程序上运行 magmi 产品导入插件,该应用程序在具有 NGINX 和 HHVM 的 aws ec2 实例上运行。当我尝试在 Magento 上运行 magmi 产品导入应用程序时,我的 hhvm 错误日志 中出现以下服务器错误。
/var/log/hhvm/error.log
\nCatchable fatal error: Object of class Magmi_ProductImportEngine could not be converted to string in /var/www/qa-hoi/magmi-importer/inc/magmi_mixin.php on line 9
这是 magmi_mixin.php 文件
<?php
class Magmi_Mixin
{
protected $_callers;
public function bind($caller)
{
$this->_callers[]=$caller;
$this->_callers=array_unique($this->_callers); // LINE 9
}
public function unbind($caller)
{
$ks=array_keys($this->_callers,$caller);
if(count($ks)>0)
{
foreach($ks as $k)
{
unset($this->_callers[$k]);
}
}
}
public function __call($data,$arg)
{
if(substr($data,0,8)=="_caller_")
{
$data=substr($data,8);
}
for($i=0;$i<count($this->_callers);$i++)
{
if(method_exists($this->_callers[$i],$data))
{
return call_user_func_array(array($this->_callers[$i],$data), $arg);
}
else
{
die("Invalid Method Call: $data - Not found in Caller");
}
}
}
}
知道我应该如何解决这个问题吗?我应该更新我的 php.ini 文件吗?
可能导致致命错误的原因。它没有发生在我的本地机器上,它有 Apache。
更新
我在本地机器上安装了 HHVM 并运行了 xdebug。 magmi 文件中的$caller 对象似乎包含几个无法评估的数组。请看下面的截图:
【问题讨论】:
标签: php magento nginx hhvm magmi