Re: [PHP-DEV] invalid array key/index not generating notices

2006-12-29 Thread Jochem Maas
without getting involved with whether there is a bug here or not (I neither have the karma or the insight to make that judgement), I would like to offer the idea that an alternative coding style could have averted the problem regardless of the lack of an E_NOTICE... namely a more defensive coding

[PHP-DEV] invalid array key/index not generating notices

2006-12-29 Thread Daniel Convissor
Folks: I came across a subtle bug a developer introduced into our application. It took us a month to realize the bug was there because PHP didn't throw a notice. Here is a simplified version of what was happening. // function some_func() {} $a = some_func(); if ($a['do_something']