I have an error this : Warning: count(): Parameter must be an array or an object that implements Countable
public static function setSection( $section, $section_data = array(), $additional_section_data = array() ) {
if(count($additional_section_data) > 0 && !empty($additional_section_data)){
$section_data['fields'] = array_merge($section_data['fields'], $additional_section_data);
}
self::$sections[ $section ] = $section_data;
}
This issue means the variable
$section_data
isn't an array. Try to usegettype
function to find out the type of the var, orvar_dump
to display it.