Bug #51827 [NEW]: Bad warning when register_shutdown_function called with wrong num of parameters
| From: | andrew dot guertin at uvm dot edu | Date: | Fri, 14 May 2010 15:42:27 +0000 |
| Subject: | Bug #51827 [NEW]: Bad warning when register_shutdown_function called with wrong num of parameters | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-150477@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: 5.3.2
Package: Unknown/Other Function
Bug Type: Bug
Bug description:Bad warning when register_shutdown_function called with wrong num of parameters
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 bug report at http://bugs.php.net/bug.php?id=51827&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51827&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51827&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51827&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51827&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51827&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51827&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51827&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51827&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51827&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51827&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51827&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51827&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51827&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51827&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51827&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51827&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51827&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51827&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51827&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51827&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51827&r=mysqlcfg