Goldinteractive / craft3-sitecopy

With this plugin you can copy the content of an entry to another site.
MIT License
22 stars 6 forks source link

Add support for php7.1. #9

Closed internetztube closed 4 years ago

internetztube commented 4 years ago

I had a problem with this error. It was caused by using the type hint object. This was introduced in php 7.2. As our environment still runs with php 7.1, I got this error.

Since Craft CMS itself needs php >=7.0.0, I think it's the right way is to use is_object instead of object since \stdClass isn't the same as object. https://github.com/craftcms/cms/blob/develop/composer.json#L21

Argument 1 passed to goldinteractive\sitecopy\SiteCopy::editDetailsHook() must be an instance of goldinteractive\sitecopy\object, instance of craft\elements\Entry given

I also want to thank you for your plugin. It saved us a lot of time and hassle.