|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-04-18 09:27 UTC] catzwolf at zarilia dot com
Description: ------------ It seems in php 5.2.1 that there is a bug that will render your 'user errorhander' useless if you add more than 2 Parameters for the arguement. Doing something like this will cause the trap to fail and not trapped. I don't think that this sort of behaviour would be by design, so a bug? Reproduce code: --------------- trigger_error( "oops we have a fatal error", E_USER_ERROR, __LINE_ ); Expected result: ---------------- I would expect the user errorhandler to trap the error and display it Actual result: -------------- It is ignored by the user error handler and php internal error handling displays the error instead. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 08:00:01 2025 UTC |
Ok I fail to see the logic as why this would not be considered a bug? If a function only excepts 2 paramenters and works as expected and you add a 3rd (that shouldn't be there) then I would expect that function to ignore the 3rd parameter and still function as intended. So what you are saying is this? function security($foo, $bar) { return ($foo && $bar ) ? true :false; } security(1,1); This function would return true, but if we did this? security(1,1,1); It would return false? Even though there is no 3rd parameter in the function. Sorry but that isn't logical at all and any script that requires this to work correctly would fail all because of a 3rd value that shouldn't be there? Because that is what is happening with trigger_error.