As a shortcut, you can just do `foreach((array) $hooks as $hook) {` on line 834. Arrays won't be changed, and strings will get converted to a single-element array.