• Hi,

    When WP was upgraded to 4.6 Lingonberry broke my site, every page had these errors at the top (edited to remove username and site):

    Warning: array_merge(): Argument #1 is not an array in /home/**user**/**example.org**/wp-includes/theme.php on line 1557
    
    Warning: array_unique() expects parameter 1 to be array, null given in /home//[username/example.org**user**/**example.org**/wp-includes/theme.php on line 1557

    and I couldn’t even login.

    Changing the theme from mysql shell to ‘twentysixteen’ let me get back in to the site (howto). Now I’m trying to figure out how to fix Lingonberry. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter maphewyk

    (@maphewyk)

    The function surrounding theme.php line 1557 $args[0] = array_unique(...:

    
    	switch ( $feature ) {
    		case 'post-thumbnails':
    			// All post types are already supported.
    			if ( true === get_theme_support( 'post-thumbnails' ) ) {
    				return;
    			}
    
    			/*
    			 * Merge post types with any that already declared their support
    			 * for post thumbnails.
    			 */
    			if ( is_array( $args[0] ) && isset( $_wp_theme_features['post-thumbnails'] ) ) {
    				$args[0] = array_unique( array_merge( $_wp_theme_features['post-thumbnails'][0], $args[0] ) );
    			}
    
    			break;
    
    • This reply was modified 7 years, 7 months ago by maphewyk.
    Thread Starter maphewyk

    (@maphewyk)

    Thankfully Preview Theme mode shows the problem, so I don’t have to change active theme and break the site again in order to troubleshoot.

    • This reply was modified 7 years, 7 months ago by maphewyk.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lingonberry broken in WP 4.6?’ is closed to new replies.