count error with $options = get_option( TFP_OPTIONS );
-
Got this error ( WP 5.5.1, Php 7.3.12 ):
Warning: count(): Parameter must be an array or an object that implements Countable in \wp-content\plugins\taxonomy-filter\taxonomy-filter-users.php on line 30
Since $options is an object, not an array, I fixed it by adding this on line 20:
// convert to iterable object
if ( ‘object’ == gettype( $options ) )
{
$options = get_object_vars( $options );
}Regards, Sander.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘count error with $options = get_option( TFP_OPTIONS );’ is closed to new replies.