• Resolved i2dreams

    (@i2dreams)


    WP 5.7.2
    PHP 8
    ———————————
    If there is nothing checked on Settings Page, whp_enabled_post_types will be assigned to empty string but it’s expected to be an array in page template.

    Not sure, about the place, but I would suggest to add a code something like this:
    ———————————

    public function settings() {

    $enabled_post_types = get_option( ‘whp_enabled_post_types’ );

    if( !is_array($enabled_post_types) ) {
    $enabled_post_types = [];
    }

    }

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal Error on Hide Posts Settings page’ is closed to new replies.