Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Error: Call to a member function set_logger() #72

Closed
robneu opened this issue Mar 27, 2017 · 3 comments
Closed

Fatal error: Uncaught Error: Call to a member function set_logger() #72

robneu opened this issue Mar 27, 2017 · 3 comments

Comments

@robneu
Copy link
Contributor

robneu commented Mar 27, 2017

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 in gistpress_init seems to resolve the issue.

Your Environment

  • Version used: 2.0.3
  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1): PHP 7.0.15
  • Server type and version: Pagely VPS (AWS)
  • Operating System and version: Ubuntu 16.04 LTS
@bradyvercher
Copy link
Owner

Looks good to me. I'll try to merge and release a new version this afternoon or tomorrow.

@GaryJones
Copy link
Collaborator

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?

@robneu
Copy link
Contributor Author

robneu commented Mar 28, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants