Skip to content

Commit

Permalink
Merge pull request #74 from moufmouf/call_user_func
Browse files Browse the repository at this point in the history
Dropping call_user_func_array from Safe functions
  • Loading branch information
moufmouf authored Jan 11, 2019
2 parents 3980192 + 1eb65cc commit 5687cf3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
21 changes: 0 additions & 21 deletions generated/funchand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,6 @@

use Safe\Exceptions\FunchandException;

/**
* Calls the callback given by the first parameter with
* the parameters in param_arr.
*
* @param callable $callback The callable to be called.
* @param array $param_arr The parameters to be passed to the callback, as an indexed array.
* @return mixed Returns the return value of the callback, .
* @throws FunchandException
*
*/
function call_user_func_array(callable $callback, array $param_arr)
{
error_clear_last();
$result = \call_user_func_array($callback, $param_arr);
if ($result === false) {
throw FunchandException::createFromPhpError();
}
return $result;
}


/**
* Creates an anonymous function from the parameters passed, and
* returns a unique name for it.
Expand Down
1 change: 0 additions & 1 deletion generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@
'ftp_site',
'ftp_ssl_connect',
'ftp_systype',
'call_user_func_array',
'create_function',
'forward_static_call_array',
'forward_static_call',
Expand Down
1 change: 1 addition & 0 deletions generator/config/ignoredFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
'oci_lob_copy',
'func_get_arg',
//'mktime', // 7th parameter has been removed in PHP 7
'call_user_func_array',
];
1 change: 0 additions & 1 deletion rector-migrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ services:
ftp_site: 'Safe\ftp_site'
ftp_ssl_connect: 'Safe\ftp_ssl_connect'
ftp_systype: 'Safe\ftp_systype'
call_user_func_array: 'Safe\call_user_func_array'
create_function: 'Safe\create_function'
forward_static_call_array: 'Safe\forward_static_call_array'
forward_static_call: 'Safe\forward_static_call'
Expand Down

0 comments on commit 5687cf3

Please # to comment.