Bug #66656 [NEW]: call_user_func_array does not return FALSE on error
| From: | vseticka dot martin at gmail dot com | Date: | Thu, 06 Feb 2014 14:30:30 +0000 |
| Subject: | Bug #66656 [NEW]: call_user_func_array does not return FALSE on error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-184182@lists.php.net to get a copy of this message | ||
From: vseticka dot martin at gmail dot com
Operating system: Windows 8.1
PHP version: 5.5.9
Package: Unknown/Other Function
Bug Type: Bug
Bug description:call_user_func_array does not return FALSE on error
Description:
------------
Function 'call_user_func_array' does not return FALSE when $param_arr is
not an array.
Test script:
---------------
<?php
function testFnc() {
echo "testFnc() was called";
return true;
}
echo "\nAbout to call: call_user_func_array()\n";
$result = call_user_func_array('testFnc', "not an array");
echo "\nAbout to call: var_dump()\n";
var_dump($result);
?>
Expected result:
----------------
$result should be FALSE (not NULL) according to the documentation page
http://php.net/call_user_func_array.
Actual result:
--------------
About to call: call_user_func_array()
<br />
<b>Warning</b>: call_user_func_array() expects parameter 2 to be array,
string given in <b>[...][...]</b> on line <b>8</b><br />
About to call: var_dump()
NULL
--
Edit bug report at https://bugs.php.net/bug.php?id=66656&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66656&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66656&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66656&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66656&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66656&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66656&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66656&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66656&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66656&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66656&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66656&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66656&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66656&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66656&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66656&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66656&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66656&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66656&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66656&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66656&r=mysqlcfg