Fix BC break in resetParameters signature

- Even though the signature was technically still BC compatible, any extension
  that did not define the second optional parameter would raise a fatal error.

- Solution was to remove the argument, and check for it with
  func_num_args/func_get_arg.
Merge branch 'pr4411'
Close #4411