boboldehampsink / import

DEPRECATED - Import plugin for Craft CMS
MIT License
177 stars 28 forks source link

Error: Trying to get property of non-object #165

Open mierla opened 7 years ago

mierla commented 7 years ago

Trying to use the plugin on a brand-new Craft install, v. 2.6.2983, and while I think the import is completing successfully, I always get "Internal Server Error: Trying to get property of non-object" along with a deprecation error, so I'm not sure.

The Craft log shows this: Trying to get property of non-object (/var/www/public/craft/plugins/import/records/Import_HistoryRecord.php:65)

achord commented 7 years ago

Im also having this issue. Import_HistoryRecord.php(65)

65 return craft()->assets->getFileById($this->file)->filename;

Slgoetz commented 6 years ago

Anyone have a solution to this?

BridgingUnit commented 6 years ago

Try changing that line 65 to this:

return craft()->assets->getFileById($this->file)['filename'];