2016-01-29 43 views
-2

在pimcore版本:3.1.1(编译:3543)我得到php.log以下错误,但在pimcore没有的debug.log错误。PHP开捕致命错误:类类定义的对象不能转换为字符串Concrete.php

[29-Jan-2016 16:28:13 Europe/Berlin] PHP Catchable fatal error: Object of class Pimcore\Model\Object\ClassDefinition could not be converted to string in /opt/bitnami/apps/pimcore/htdocs/pimcore/models/Webservice/Data/Object/Concrete.php on line 104 

我得到HTTP 500自定义WebService的内部服务器错误响应。

我怎么能查吗?有没有已经为这个错误的决议?

生成错误pimcore源代码行(Concrete.php)如下:

throw new \Exception("No element [ " . $element->name . " ] of type [ " . $element->type . " ] found in class definition " . $class); 

因此,似乎由于错误的错误处理。

+1

我们需要一些代码,以帮助...... –

+1

你得到一个错误尝试什么?需要一些代码请 – fusion3k

+0

此问题的解决方案是不尝试使用一个对象作为字符串。 –

回答

0

的错误(https://github.com/pimcore/pimcore/issues/422)现在解决,计划在Pimcore 4.0.0释放

探讨我用error_logget_classgettype PHP函数:

error_log(" found in class definition [ " . get_class($class)); 
error_log("variable 'class' type = " . gettype($class)); 
error_log("'class->name' = " . $class->name); 

感谢@ fusion3k为帮助识别错误代码行的正确部分以及语法get_class($class)

相关问题