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

Spectacular failure when PHP version is too low #538

Closed
Japh opened this issue May 20, 2014 · 1 comment

Comments

Projects
None yet
3 participants
@Japh
Copy link

commented May 20, 2014

When attempting to activate Stream on a site using PHP lower than 5.3 (in this example, 5.2.17), there's a big nasty error:

php-version-error

It'd be good if we could catch this and show a more user-friendly error so it's clear what needs to be fixed before activating Stream again.

cc/ @fjarrett

@fjarrett fjarrett self-assigned this May 20, 2014

@fjarrett

This comment has been minimized.

Copy link
Contributor

commented May 20, 2014

This is happening because we're using an anonymous function in the notice method! So when the PHP version is less than 5.3 the message fails because 5.3 is required to even display it 😸

c.f. https://github.com/x-team/wp-stream/blob/35ec3ad78949f680a977534bc5c435a1f2b28fe2/stream.php#L272

I believe this can be refactored fairly easily. Doing so now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.