• Hi, I believe I found a bug in the theme’s code, which causes a warning in PHP 8:

    Warning: Undefined variable $storeship_show_section_4 in \wp-content\themes\storeship\inc\blocks\featured\block-featured-secondary.php on line 20

    After a quick look at the code I found out that, indeed, there are no such variables declared, yet they’re used in an if!

    $storeship_show_section_1 = storeship_get_option(‘show_content_section_1’);
    $storeship_show_section_2 = storeship_get_option(‘show_content_section_2’);
    $storeship_show_section_3 = storeship_get_option(‘show_content_section_3’);

    if($storeship_show_section_1 || $storeship_show_section_2 || $storeship_show_section_3 || $storeship_show_section_4 || $storeship_show_section_5): ?>

    It looks like it’s just missing a few lines of extra code (unless there aren’t any sections 4 and 5 on Storeship free):

    $storeship_show_section_4 = storeship_get_option(‘show_content_section_4’);
    $storeship_show_section_5 = storeship_get_option(‘show_content_section_5’);

    I haven’t seen other PHP 8 compatibility issues other than this, would be great if this were fixed, I would be able to upgrade my site to PHP8.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8 warnings’ is closed to new replies.