Closed robneu closed 7 years ago
Looks good to me. I'll try to merge and release a new version this afternoon or tomorrow.
In what circumstance is this error being triggered? How is gistpress_init()
being called without the global being populated without it being an instance of GistPress
?
It happens when attempting to run any WP-CLI command on a box running PHP 7+. The only way I was able to avoid it was to tell WP-CLI to skip loading plugins.
I haven't investigated any further than that.
When using WP-CLI on a PHP 7 Pagely VPS the above error error causes WP-CLI to fail completely.
Possible Solution
Checking
$gistpress instanceof GistPress
ingistpress_init
seems to resolve the issue.Your Environment