You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JW_SIMPLE_OPTIONS function jop_checked throws error on unchecked categories. Error notice: Notice: Array to string conversion in ../wp-includes/general-template.php on line 3550
You need to stringify $haystack, if match is not met. My quick solution
functionjop_checked( $haystack, $cur, $show = FALSE ) {
if ( is_array( $haystack ) && in_array( $cur, $haystack ) ) {
$cur = $haystack = 1;
}
if(is_array($haystack)) { //if $haystack is still an array, take first value$haystack = array_shift($haystack);
}
returnchecked( $haystack, $cur, $show );
}
The text was updated successfully, but these errors were encountered:
@kloneets yea thanks, simple options is horribly outdated. It's on my radar. I plan on moving all settings to the WordPress settings API sometime in the near future.
JW_SIMPLE_OPTIONS function
jop_checked
throws error on unchecked categories. Error notice:Notice: Array to string conversion in ../wp-includes/general-template.php on line 3550
You need to stringify $haystack, if match is not met. My quick solution
The text was updated successfully, but these errors were encountered: