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.
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.
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 ofobject
since\stdClass
isn't the same asobject
. https://github.com/craftcms/cms/blob/develop/composer.json#L21I also want to thank you for your plugin. It saved us a lot of time and hassle.