|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-11 15:30 UTC] sniper@php.net
[2005-06-13 09:52 UTC] a dot bendilas at zefxis dot gr
[2005-06-13 10:25 UTC] tony2001@php.net
[2005-06-21 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 13:00:01 2025 UTC |
Description: ------------ There seems to be a strange behaviour when it comes to the execution of a custom error handler.Particularly, a query is executed twice, but the rest of the code only once. Reproduce code: --------------- set_error_handler("user_error_handler"); function user_error_handler($severity, $msg, $filename, $linenum,$content) { if ($severity & E_STRICT){ return; } else{ $errorMsg ='There was an error'; echo 'test'; $link = mysql_connect('localhost', 'root', 'password'); $db_selected = mysql_select_db('db', $link); $sql = "INSERT INTO Errors (ErrorMsg ,DateCreated) VALUES ( '".$errorMsg."' ,NOW() )"; $results = mysql_query($sql); die; } } echo s; Expected result: ---------------- The query should run once and 'test' should appear on the screen Actual result: -------------- The query is executed twice and 'test' appears only once on the screen