• Hello! Slider button “rel” parameter (custom link URL) is empty after PHP8. The relevant wrong code is here:

    /library/template-parts/slider.php

    $button_1_link_content 	  = intval( $slide['super_simple_slider_slide_button_1_link_content'] );
    // ...
    if ( $button_1_link_content != 'custom' && $button_1_link_content > 0 ) {
      $button_1_link_url = get_permalink( $button_1_link_content );
    } else if ( $button_1_link_content == 'custom' ) {
      $button_1_link_url = esc_url( $button_1_link_custom_url );
    }

    This variable is always be 0 (zero), because intval() returns 0 on text value. This is the expected operation, but PHP 7.4 handles this wrong, and intval() returns the original string (“custom”). This should be fixed fot PHP8.

  • The topic ‘Button if unclickable if custom link is set – PHP8’ is closed to new replies.