Bug #51827 [Opn->Csd]: Bad warning when register_shutdown_function called with wrong num of parameters
| From: | felipe@php.net | Date: | Fri, 14 May 2010 23:48:53 +0000 |
| Subject: | Bug #51827 [Opn->Csd]: Bad warning when register_shutdown_function called with wrong num of parameters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150482@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51827&edit=1
ID: 51827
Updated by: felipe@php.net
Reported by: andrew dot guertin at uvm dot edu
Summary: Bad warning when register_shutdown_function called
with wrong num of parameters
-Status: Open
+Status: Closed
Type: Bug
Package: Unknown/Other Function
Operating System: Linux
PHP Version: 5.3.2
-Assigned To:
+Assigned To: felipe
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2010-05-15 01:48:06] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=299395
Log: - Fixed bug #51827 (Bad warning when register_shutdown_function
called with wrong num of parameters)
------------------------------------------------------------------------
[2010-05-14 17:42:27] andrew dot guertin at uvm dot edu
Description:
------------
When register_shutdown_function is called with a function that expects a
certain number of parameters, and a different number are given, a very
unhelpful warning is printed:
Warning: (null)() expects exactly 1 parameter, 0 given in Unknown on
line 0
This can take slightly different forms:
Warning: (null)() expects at least 2 parameters, 1 given in Unknown on
line 0
or on a different server:
Warning: Wrong parameter count for (null)() in Unknown on line 0
Test script:
---------------
<?php register_shutdown_function('explode'); ?>
Expected result:
----------------
I expect to be given the correct function name, filename, and line
number in the warning.
Actual result:
--------------
I am given useless information for function name, filename, and line
number.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51827&edit=1