Custom Fields
Support Meta Box Group Parse error in class-rwmb-group-field.php

  • Creator
  • #6399
    Resolved martinschapiro

    I recently updated metabox group to 1.2.9 and the update threw a fatal error.

    Parse error: syntax error, unexpected '[' in /home/lstudio/public_html/wp-content/plugins/meta-box-group/class-rwmb-group-field.php on line 284

    I was able to fix this error by replacing the brackets in line 284 to an array.


                    'attributes' => [
                        'data-current' => $field['default_state'],


                    'attributes' => array(
                        'data-current' => $field['default_state'],

    This site is running php version 5.3.26. I did not see this error on my local install running php version 5.6.10. Is anything I might do in my theme files to guard against this error in future updates? I am also now working on upgrading the version of php.

    I'm happy to provide any more information that you might find helpful.

Viewing 1 replies (of 1 total)
  • Author
  • #6401
    Anh Tran

    Oops, I used the short array syntax, which is available for PHP >= 5.4. Just fixed it in 1.2.10.

    Thanks a lot for reporting!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.