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

  • @mww I honestly don’t have a clue. There is too much going on with that line for me to figure out what part of it is causing the error or why it would cause an error in PHP 8. (I’m not an ACF dev).

    You might want to contact the devs on it.

    If it was me I would open that file and make changes and see if I could figure it out because it is the type of thing I would do. But I don’t have any sites running php PHP 8 yet.

    Since I now that it is causing an error I would use the error log

    this is the line of code causing the error

    $value[ $i ][ $sub_field['_name'] ] = $sub_value;

    and this is what I would do to start

    echo '$i = ';
    echo "\r\n".'$sub_field[_name] = ';
    echo "\r\n".'$sub_value = ';
    $value[ $i ][ $sub_field['_name'] ] = $sub_value;

    You now the last line is going to cause a fatal error, so you just need to find it in the log and then see what is in the log before that point. Figure out what part is causing the error and then go from there.