I call a function with 2 params sent by reference:
if (!functionX($arg1, $arg2, $arg3, $arg2, &$error, &$error_msg)) {
// blah blah
}
The idea is that this code lives in a form handler and it needs to return true or false but I need some extra information if it returns false so I sent the error vars by reference so they can be modified.
I recently updated to php 5 and now get this error:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of functionX(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/www/html/fileX.php on line 213
The function definition starts like this - it also has the & for passing by reference.
function prelim_validate_cc_num($arg1, $arg2, $arg3, $arg4, &$error, &$error_msg) {
// blah blah blah
}
Is it enough to remove the ampersands from the function call or do I need to restructure my function?