2017-05-09 68 views
0

目前在我的網站上使用woocommerce上的Wordpress構建了以下錯誤消息。Woocommerce插件錯誤消息(PHP)

解析錯誤:語法錯誤,意想不到的 '=',期望 ')' /home4/name/public_html/mysite.com/wp-content/plugins/webappick-product-feed-for-woocommerce/includes /classes/class-woo-feed-products.php上線674

這是它與錯誤指太行,不過,我看不出有什麼錯誤呢?

$imgIds=!empty($ids=$this->getAttributeValue($Id,"_product_image_gallery"))?explode(",",$ids):""; 

任何人都可以說明這條線的錯誤是什麼?

回答

0

empty函數總是期望一個變量作爲參數而不是條件。

而不是empty($ids=$this->getAttributeValue($Id,"_product_image_gallery"))嘗試empty($this->getAttributeValue($Id,"_product_image_gallery"))應該爲你工作。

+0

這給出了以下錯誤 - 「在寫入上下文中不能使用方法返回值」 –

+0

然後在prev行中執行該操作...但不是在三元運算符中,或者作爲空函數的參數 – Alice