Home Forums Add-ons Repeater Field Reapeater field problem with PHP 8 Reply To: Reapeater field problem with PHP 8

  • basically, as I understand it, PHP 7 lets you do something like this

    // create a value that is a string
    $value = 'ABCD';
    // use the above variable and replace it with an array
    // this automatically unsets the variable and creates an array
    $value[] = 'ABCD'

    PHP 8 does not allow this. You would first need to reinitialize the variable to an array

    // set a variable with a string value
    $value = 'ABCD';
    // set the var to an array
    $value = array();
    // set at array var
    $value[] = 'ABCD'