On Fri, Jun 15, 2012 at 10:49:32AM +0100, Chris Green wrote:
However it's outputting *hundreds* of "Trying to get property of non-object" errors which are somewhat distracting as there are more of them than actual data.
I'm pretty sure the reason they're appearing is because the code is accessing lots of values before they're created (and presumably doing the right thing when they're null). It's not just in one place in the code so I can't very easily go and change the code at every place this is happening.
Is there a way to turn of this particular warning? I'd rather not turn of all warnings and I'd rather do it just for this application rather than everywhere (I want to see warnings on code I've written!).
It wasn't actually so difficult to fix the code, half a dozen "if (! isset($var))" fixed it.