#27290 [Opn->Csd]: warning msg on missing function argument should mention file/line of caller too

From: Date: Mon, 06 Sep 2004 06:10:21 +0000
Subject: #27290 [Opn->Csd]: warning msg on missing function argument should mention file/line of caller too
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65786@lists.php.net to get a copy of this message
ID: 27290 Updated by: derick@php.net Reported By: hartmut@php.net -Status: Open +Status: Closed Bug Type: Feature/Change Request PHP Version: 5CVS-2004-02-17 (dev) New Comment: Override your error handling function with set_error_handler() and use debug_print_backtrace(), or install Xdebug which automatically does the printing of backtraces for you (http://xdebug.org) Previous Comments: ------------------------------------------------------------------------ [2004-09-03 19:09:47] sean at acidreign dot net over the last few days, I've had to tack down dozens of errors, with out knowing the file/line they actually occur in. reporting the line of the function declaration rather then the line of the offending expression is completely useless. It makes tracking bugs extremely difficult, because it has to be done on a trial and error basis, looking for and testing every place a function is called. ------------------------------------------------------------------------ [2004-02-17 11:11:08] hartmut@php.net Description: ------------ usually the location of the caller what you really want to know here, especially if you are trying to track this down from not-so-recent messages in your error_log ... Reproduce code: --------------- <?php function foo($bar) { } foo(); ?> Expected result: ---------------- Warning: Missing argument 1 for foo() in foo.php on line 2, called in foo.php on line 4 Actual result: -------------- Warning: Missing argument 1 for foo() in - on line 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27290&edit=1

« previous php.bugs (#65786) next »