Home Forums ACF PRO api-helpers.php on line 846 error after updating


api-helpers.php on line 846 error after updating

  • Warning: array_key_exists() expects parameter 2 to be array, boolean given in /home/wficbs/public_html/debuginstall/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 846

    Error after upgrading to newest version of ACF

  • Got the same warnings since upgrading from 5.1.0 to 5.1.1.

  • Same here after upgrading ??

  • I’m also getting this.

  • Same problem after upgrading to 5.1.1.

  • Dang…ditto here. I reverted back to 5.1.0 and the errors went away. However, I’ve updated other sites with v.5 and not seen any issues. Anyone have thoughts on what specific combination of fields/repeaters/etc might be causing this? Thanks in advance.

  • 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();

  • Same here.

    In addition, if you just do an empty update on the offending post, the error goes away.

  • Thanks for that fix, @bsudeep – that did work for me too.

    Unfortunately I have this on every page so going through and opening each and re-saving isn’t very practical in this instance.

    Hoping Elliot comes up with a fix soon!

  • Same issue here. I just bought and implemented the ACF Pro plugin with repeaters an hour ago.

    Updating the page is not working for me however.

  • @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,

    will help!

  • Hi guys

    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.

  • Update: Just released ACF PRO 5.1.2 – fixes acf_extract_var() issues

    Please let me know if your issues are resolved after updating

  • Yup looks good, thank you 🙂

  • Looks good to me, thanks @Elliot Condon

  • 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.

  • Just wanted to second @emiel note, I have 5.1.3 and

    Notice: Undefined index: data-width in D:\Xampp\htdocs\demo\wp-content\plugins\advanced-custom-fields-pro\api\api-helpers.php on line 45

    shows up on all screens/tabs if you have even one width set for a field.

Viewing 22 posts - 1 through 22 (of 22 total)

The topic ‘api-helpers.php on line 846 error after updating’ is closed to new replies.