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’ );
}
}
}
}