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

Cater for fields with no value #7

Open
bobbingwide opened this issue Jun 14, 2023 · 0 comments
Open

Cater for fields with no value #7

bobbingwide opened this issue Jun 14, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jun 14, 2023

Some of the field types have render methods that access array elements within the field.
They assume that a value has been entered.
When it hasn't then a Fatal error may occur
eg

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, bool given in C:\apache\htdocs\wordpress\wp-content\plugins\acf-field-block\includes\class-acf-field-block-renderer.php:385

The logic should take these instances into account and return early when there's nothing to render.

This test should be performed within the rendering method.

@bobbingwide bobbingwide added the bug Something isn't working label Jun 14, 2023
@bobbingwide bobbingwide self-assigned this Jun 14, 2023
bobbingwide added a commit that referenced this issue Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant