I have several functions in my code, who require more than 1 arguments.
I was using PHP 5.5, and whenever I input only the first argument, it worked fine, and simply ignored the second argument (I guess it saw it as "0").
But I've just upgraded to PHP 7.2 and this has become an issue.
So instead of fixing all of my code, which is spread on multiple files, is there a way to order PHP 7.2 to keep treating undefined arguments as "0", in order to avoid this Error, which is causing the page to crash?
EDIT:
sample function:
function calculate( $m,$status ) {
return ''.$m.''.$status.'';
}
if $status doesn't exist, it should simply output $m
return ''.$m.''.$status.'';toreturn $m . $status;. The quotes aren't needed.