You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When hooks get called in the request class (runPreHooks, runRenderHooks etc), the sumbitVar and hook names are passed as $customProperties to the loadMultiple method of the Hook class. The implementation of loadMultiple method passes the $customProperties as $errors to the load method. Secondly the $errors of the loadMultiple method are never forwarded to the load method.
$customProperties in loadMultiple method should be passed as $customProperties to the load method. And $errors in loadMultiple method should be forwarded to the load method.
Implementation in loadMultiple method should be as followed:
Bug report
Summary
When hooks get called in the request class (runPreHooks, runRenderHooks etc), the sumbitVar and hook names are passed as $customProperties to the loadMultiple method of the Hook class. The implementation of loadMultiple method passes the $customProperties as $errors to the load method. Secondly the $errors of the loadMultiple method are never forwarded to the load method.
Step to reproduce
See implementation of loadMultiple method:
FormIt/core/components/formit/src/FormIt/Hook.php
Line 106 in de51f81
and the interface of load method:
FormIt/core/components/formit/src/FormIt/Hook.php
Line 127 in de51f81
Observed behavior
Variables are mixed in the loadMultiple method
Expected behavior
$customProperties in loadMultiple method should be passed as $customProperties to the load method. And $errors in loadMultiple method should be forwarded to the load method.
Implementation in loadMultiple method should be as followed:
$success = $this->load($hook, $this->fields, $errors, $customProperties);
Environment
N/A
The text was updated successfully, but these errors were encountered: