Support

Account

Home Forums General Issues Repeater field in template breaks in PHP 8 Reply To: Repeater field in template breaks in PHP 8

  • Thanks for the quick response. I tried that previously and got the same error, it never executes the print_r because the error is cause when i run get_sub_field.

    Definitely get_sub_field is returning an object. I can go into shortcodes.php and add a print_r and see the object, but only if i run it before lines 212 and and 221 (WP v5.9.3) where $content is evaluated as a string at various points and it fails.

    Like you say it seems unlikely that get_sub_field, which clearly returns an WP Object, should be getting do_shortcode run on it at all. but I can confirm that with no additional code, just me running $postobject = get_sub_field('related_pages'); i get the same error and that i can print_r from the do_shortcode function and see my object returned.

    I’m gonna dig into the ACF configuration and come back here to try describe how these fields relate, maybe i’ve stacked ACF features incorrectly. Also i’m gonna isolate this chunk of code from other wordpress loops etc and see if it’s somehow getting caught up in some other way so it gets run by do_shortcode but any insight deeply appreciated.