Make sure the $hook argument is always a string

Closes #3508292

Merge request reports

Loading