Avoid PHP warnings with PHP >= 7.2.x
Fix PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable on line 263
This commit is contained in:
@@ -39,8 +39,11 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
$title_format = get_option( 'sportspress_event_list_title_format', 'title' );
|
$title_format = get_option( 'sportspress_event_list_title_format', 'title' );
|
||||||
$time_format = get_option( 'sportspress_event_list_time_format', 'combined' );
|
$time_format = get_option( 'sportspress_event_list_time_format', 'combined' );
|
||||||
|
|
||||||
if ( is_array( $usecolumns ) )
|
if ( is_array( $usecolumns ) ) {
|
||||||
$usecolumns = array_filter( $usecolumns );
|
$usecolumns = array_filter( $usecolumns );
|
||||||
|
}else{
|
||||||
|
$usecolumns = array();
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<div class="sp-data-table-container">
|
<div class="sp-data-table-container">
|
||||||
<table class="widefat sp-data-table sp-calendar-table">
|
<table class="widefat sp-data-table sp-calendar-table">
|
||||||
@@ -272,4 +275,4 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user