Skip to main content
Image alt
ErrorsHow To...PluginTheme

HOW TO: Fix parameter must be an array in /modeltheme-framework/init.php on line 746

If your site is using Model Theme and you upgrade to PHP 7.2, you may come across this:

Warning: count(): Parameter must be an array or an object that implements Countable in /wp-content/plugins/modeltheme-framework/init.php on line 746

The fix: In wp-content/plugins/modeltheme-framework/init.php, change line 746:

elseif ( is_array( $meta_box['pages'] ) && count( $meta_box['pages'] === 1 ) )


elseif ( is_array( $meta_box['pages'] ) && count( $meta_box['pages'] ) === 1 )