Invalid argument supplied for foreach()

Support MB Columns Invalid argument supplied for foreach()

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30289
    agorskiagorski
    Participant

    Logging the following warning: Invalid argument supplied for foreach() in /Users/alexgorski/Code/jbfc/mainsite-wp/public/wp-content/plugins/meta-box-columns/src/Processor.php on line 73

    The value of meta_box[columns] is 12 instead of the expected array. This started happening when I upgraded to 1.2.9 (from a much older version) and is still occurring with 1.2.13.

    Here is log and offending function:

    [16-Aug-2021 14:59:07 UTC] PHP Warning:  Invalid argument supplied for foreach() in /mainsite-wp/public/wp-content/plugins/meta-box-columns/src/Processor.php on line 73
    [16-Aug-2021 14:59:07 UTC] printing meta_box[columns]
    [16-Aug-2021 14:59:07 UTC] 12
    /**
         * Fetch and store column data from meta box.
         */
        protected function parse_columns() {
            if ( empty( $this->meta_box['columns'] ) ) {
                return;
            }
            foreach ( $this->meta_box['columns'] as $key => $column ) {
                $this->columns[ sanitize_key( $key ) ] = $this->parse_column( $column );
            }
            error_log("printing meta_box[columns]");
            error_log($this->meta_box['columns']);
            $this->has_columns = true;
        }
    #30302
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for your feedback.

    I've escalated this issue to the development team to fix it in the next update.

    #32621
    agorskiagorski
    Participant

    Hello Long,

    I see the fix for this did not make version 1.2.14. Is there anything I can do to help move this along?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.