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

PHP Fatal error: Uncaught TypeError: Argument 2 passed to Caldera_Forms_Field_Util::has_field_type() must be of the type array, null given #3167

Closed
Tofandel opened this issue Apr 16, 2019 · 2 comments
Assignees
Milestone

Comments

@Tofandel
Copy link

Tofandel commented Apr 16, 2019

On the default install of caldera if I try to view an entry it returns the following PHP Error
PHP Fatal error: Uncaught TypeError: Argument 2 passed to Caldera_Forms_Field_Util::has_field_type() must be of the type array, null given

It happens when there is something url encoded in the label of a an option (Eg: %C3%C3) (If you put a link inside the label for example)
That's because the option label tries to apply magic tags when it shouldn't

I tracked it down to the method format_select_options in core.php and the call to self::do_magic_tags($option['label']);

Why is the label magic tagged? There is no point in it is there? Anyway even if there was it would cause an error when viewing the entry because the form global is not defined at this point and would throw this error

@Tofandel
Copy link
Author

#3168

@Shelob9 Shelob9 added this to the 1.8.5 milestone Apr 24, 2019
Shelob9 pushed a commit that referenced this issue May 21, 2019
Set $form variable to prevent error with magic tag in labels - Fixes #3167
@Shelob9
Copy link
Collaborator

Shelob9 commented May 21, 2019

Close via 8d87bdc #3207

@Shelob9 Shelob9 closed this as completed May 21, 2019
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

3 participants