Public Ticket #3500764
PHP 8.1 and above error correction


  • Kevin started the conversation

    Please fix this in future releases.  

    Hi, we found an issue with your code when having our site run PHP 8.1. The issue is in /assets/includes/slider_markup_setup.php on line 168:

    if( $toParams[1] === '50%' ) { $toParams[1] = 'slidermiddle'; }
    should be changed to something similar to:
    if(isset($toParams[1])) { if( $toParams[1] === '50%' ) { $toParams[1] = 'slidermiddle'; } }

    When doing a var_dump on $toParams, depending on the settings set in LayerSlider, $toParams[1] would spit out an undefined array key warning in PHP. This happens when wp_debug is turned off as well as on. Can this please be corrected in the next update? Thank you.

  •  70
    John replied

    Hi Kevin,

    Thank you for getting in touch with us. My name is John, and I'm happy to assist you today. I appreciate your patience while we've been working toward your ticket.

    Absolutely! We'll look into this and make the necessary changes. In the meantime, you can turn off PHP's display_errors setting to prevent debug messages from appearing on your site.

    Thank you for reporting this issue! 

    Best Regards,
    John | Kreatura Dev Team