3

Please correct me if I am wrong. From what I gather, PHP should issue a warning for this but doesn't. I am using PHP 5.2.17. How can I fix this? I am assuming this is set somewhere in php.ini?

Tyler Crompton
  • 12,284
  • 14
  • 65
  • 94

2 Answers2

4

Check the docs for error reporting. I believe if you enable E_NOTICE you'll see warnings for undefined variables. You can read up on all the error reporting constants here.

Steven Mercatante
  • 24,757
  • 9
  • 65
  • 109
3

Probably error reporting is off.

error_reporting(-1);

Or, you are using a variable in a way that it does not have to be declared.

Shay Ben Moshe
  • 1,298
  • 3
  • 12
  • 27