Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$customProperties are processed wrong and $errors never forwarded in Hook class #254

Open
arjen-t opened this issue Jun 21, 2021 · 0 comments

Comments

@arjen-t
Copy link

arjen-t commented Jun 21, 2021

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:

$success = $this->load($hook, $this->fields, $customProperties);

and the interface of load method:

public function load($hookName, $fields = [], $errors = [], $customProperties = [])

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant