Yep, same here. I downgraded to 5.9 because of that…
Messages, appeard in 5.11:
Warning: array_key_exists() expects parameter 2 to be array, boolean given in /Path/to/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 846
I used a repeater field with 2 subfields,
and a template-Loop seems to cause the error:
while ( have_rows(‘galleries’) ) : the_row();
@t-racer It was more like an attempt at a temporary hackey fix till the actual problem gets sorted out.
Note for anyone trying to use the empty update post temp hackey fix.
Updating the empty post causes the have_rows( ‘acf_field_name’ ) to return true, Consequently an empty row gets printed out 😐
Also, apparently it does not work for everyone.
I was originally getting the same error as in the first post in this thread, now I am getting a different error with the same cause:
Fatal error: Cannot use string offset as an array in SERVERURLHERE/wp-content/plugins/advanced-custom-fields-pro/api/api-template.php on line 580
However, this error is a fatal error and immediately stops the page drawing whereas before it was simply a warning.
It’s a simple bug with a simple fix, i’m sure Elliot will have 5.1.2 out the door very quickly, but if this is really affecting you,
Thanks @lgladdy for the patch, which I’ll add to my to-do list, but I would like to first understand why the $array is false in the first place.
Does anyone know what the initial function is that is using the acf_extract_var function and passing in a blank value for $array?
I can’t replicate it on my end even with a field which doesn’t exist, however, I have just fixed a have_rows issue which may have been the initial cause. I’ll undo my work and test there.
JFTR: I believe you are spot-on with the have_rows issue. Just yesterday, I stumbled over the error and narrowed it down to a single, lonely
if ( have_rows('field') ) starting off the treatment of a flexible content field. And, like for the others here, the 5.1.2 update corrects it.
BeEsides this error, there’s another error since one of the latest plugin releases. If a width is set in the wrapper attribute this error shows up:
SERVERURL/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 457
As soon as the width setting is removed the error is gone.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.