Fix: Warnings about "Undefined variable: count" and "Trying to get property 'publish' of non-object"
This commit is contained in:
@@ -65,9 +65,7 @@ class SP_Meta_Box_Outcome_Details extends SP_Meta_Box_Config {
|
||||
'=' => sprintf( __( 'Equal %s', 'sportspress' ), $label ),
|
||||
'else' => sprintf( __( 'Default', 'sportspress' ), $label ),
|
||||
);
|
||||
for( $i = 1; $i <= $count->publish; $i++ ):
|
||||
$options[ $i ] = $i;
|
||||
endfor;
|
||||
|
||||
foreach ( $options as $key => $value ):
|
||||
printf( '<option value="%s" %s>%s</option>', $key, selected( true, $key == $condition, false ), $value );
|
||||
endforeach;
|
||||
|
||||
Reference in New Issue
Block a user