Spectacular failure when PHP version is too low
Japh opened this issue · comments
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:
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
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...