Re: [PHP] require_once and E_WARNING?

2006-07-06 Thread Martin Marques
On Wed, 5 Jul 2006, [EMAIL PROTECTED] wrote: Hello all, According to the PHP Manual, when require or require_once failes, an E_ERROR is triggered: require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a

Re: [PHP] require_once and E_WARNING?

2006-07-06 Thread chris smith
On 7/6/06, Martin Marques martin@bugs.unl.edu.ar wrote: On Wed, 5 Jul 2006, [EMAIL PROTECTED] wrote: Hello all, According to the PHP Manual, when require or require_once failes, an E_ERROR is triggered: require() and include() are identical in every way except how they handle failure.

Re: [PHP] require_once and E_WARNING?

2006-07-06 Thread Jochem Maas
chris smith wrote: On 7/6/06, Martin Marques martin@bugs.unl.edu.ar wrote: On Wed, 5 Jul 2006, [EMAIL PROTECTED] wrote: Hello all, According to the PHP Manual, when require or require_once failes, an E_ERROR is triggered: require() and include() are identical in every way except how

Re: [PHP] require_once and E_WARNING?

2006-07-06 Thread Martin Marques
On Thu, 6 Jul 2006, chris smith wrote: Have you tried this handler with something more fatal, like a missing semi-colon or a } missmatch? That will cause a parse error and the script won't even run. You're right. My wrong. :-( -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92,

RE: [PHP] require_once and E_WARNING?

2006-07-06 Thread KermodeBear
chris smith wrote: try it with a call to an undefined function e.g.: $foo = thisFunctionDoesNotExistAtLeastItHadBetterNot(); When this is done, the error handler doesn't get called at all, and the script simply dies with an error message (which could be a bug as well, but might also be

Re: [PHP] require_once and E_WARNING?

2006-07-05 Thread Chris
[EMAIL PROTECTED] wrote: Hello all, According to the PHP Manual, when require or require_once failes, an E_ERROR is triggered: require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. (With 'Fatal

Re: [PHP] require_once and E_WARNING?

2006-07-05 Thread php
Code: function default_error_handler($code, $error, $file, $line) { switch ($code) { case E_ERROR: die (Error: $error); case E_WARNING: die(Warning: $error); default: die(Something else entirely: $error); } } set_error_handler('default_error_handler');