Debugging: expects parameter 1 to be array, boolean given in…
-
Hey guys,
Very new to wordpress so please forgive any lack of knowledge.
Resurrecting an old wordpress version of website to replace what is currently live. Successfully installed wordpress locally and imported the old files. Unfortunately, hit a coding bug so nothing from these files (themes, pages, etc) fully loads.
Was able to identify the source of the issue but no clue how to fix. Any input would be greatly appreciated!Error messages:
Warning: uksort() expects parameter 1 to be array, boolean given in C:\wamp\…\wp-admin\includes\class-wp-themes-list-table.php on line 48
Warning: array_slice() expects parameter 1 to be array, boolean given in C:\wamp\…\wp-admin\includes\class-wp-themes-list-table.php on line 55Here is what the code looks like in the section of the class-wp-themes-list-table.php:
if ( $this->search || $this->features ) {
foreach ( $themes as $key => $theme ) {
if ( !$this->search_theme( $theme ) )
unset( $themes[ $key ] );
}
}unset( $themes[$ct->name] );
uksort( $themes, “strnatcasecmp” );$per_page = 24;
$page = $this->get_pagenum();$start = ( $page – 1 ) * $per_page;
$this->items = array_slice( $themes, $start, $per_page );
$this->set_pagination_args( array(
‘total_items’ => count( $themes ),
‘per_page’ => $per_page,
) );
}uksort() and array_slice() are the source. I’ve researched a bunch of the forums and found similar issues, but couldn’t identify the right resolution to my problem.
Thank you in advance!
- The topic ‘Debugging: expects parameter 1 to be array, boolean given in…’ is closed to new replies.