Home Forums WoodMart support forum PHP log error

PHP log error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #170605

    nominal99
    Participant

    Hi, I have an error coming up constantly in my PHP error log, it doesn’t do it on any other website I have (I’ve attached the file template.php it’s referring to) which is:

    [28-Jan-2020 21:54:35 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/rcmodelshopdirec/public_html/wp-admin/includes/template.php on line 1251

    The line of code it refers to is this:
    foreach ( $sorted as $box_context => $ids ) {

    The block of code that line comes from is this:

    // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
    $sorted = get_user_option( “meta-box-order_$page” );
    if ( ! $already_sorted && $sorted ) {
    foreach ( $sorted as $box_context => $ids ) {
    foreach ( explode( ‘,’, $ids ) as $id ) {
    if ( $id && ‘dashboard_browser_nag’ !== $id ) {
    add_meta_box( $id, null, null, $screen, $box_context, ‘sorted’ );
    }
    }
    }
    }

    #170613

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    Could you please check how it works with some default WordPress theme like twentysixteen to understand is it our theme issue or not?

    Regards

Viewing 2 posts - 1 through 2 (of 2 total)