1

I'm sure the answer is out there, I haven't figured out the correct combination of words to search on to find it. Note: this is not a noob "how do I avoid looking up the answer myself" question, I've been working with PHP long enough that I know how this is supposed to work. It just doesn't work in this case for as-yet unknown reasons. Been working on this for enough hours that I need to stop & ask.

PHP 5.6.3 on Windows 2012, upgraded from 5.3 where there was no problem (I know, I know, E_STRICT is included in E_ALL as of 5.4, keep reading)

php.ini has:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

...but the Strict Standards errors still appear (Only variables should be assigned by reference, Non-static method should not be called statically, etc.).

In php.ini, changing the value of display_errors from "On" to "Off" removes all the errors & notices, so I know I'm editing the correct php.ini file, but I need them on for dev so can't just hide everyting. The error_reporting() function is not modifying the setting anywhere in code.

  • 1
    Possible duplicate of [How to disable E\_STRICT](https://stackoverflow.com/questions/2851004/how-to-disable-e-strict) – Matt Jun 20 '17 at 20:56
  • Not really - I'm asking why error_reporting in php.ini is not having the desired effect when the error reporting is not being changed anywhere in code. – Navin R. Johnson Jun 20 '17 at 22:11
  • Deleting my answer until I can do research on it tomorrow. – Matt Jun 20 '17 at 23:34
  • If you call `error_reporting() ` immediately after setting it, do you get back the same value you set? – Matt Jun 20 '17 at 23:35
  • error_reporting() says 22527, which is E_ALL & ~E_STRICT & ~E_DEPRECATED, and yet the strict standards errors remain – Navin R. Johnson Jun 22 '17 at 16:44
  • It's become a moot point, the plugin that created the need to upgrade to 5.6 has been switched out for a different one that works in 5.3, but if I ever figure this out I'll post the answer. – Navin R. Johnson Jun 22 '17 at 16:46

0 Answers0