Avoid fatal error on PHP 5.2

Passing func_get_args() directly to call_user_func_array() causes a fatal error in PHP 5.2, which is fixed by first putting the results in a variable.
Merge pull request #373 from alimony/patch-1

Avoid fatal error on PHP 5.2