2016-01-29 72 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)

相關問題