• Hi,

    I’ve upgraded to PHP 8.1.15 and I got some errors on my site.
    My site tellss me to:
    Warning: Trying to access array offset on value of type bool in?/home/ktsjing/domains/k-tsjing.be/public_html/beta2/wp-content/themes/angio/partials/loop.php?on line?75
    warning: Trying to access array offset on value of type bool in?/home/ktsjing/domains/k-tsjing.be/public_html/beta2/wp-content/themes/angio/partials/loop.php?on line?77
    Dates


    This the code I have in my wordpress file loop.php

    ////////////////
    // BACKGROUND //
    ////////////////
    if ( ! empty( get_post_meta( get_the_ID(), '_image_vertical_bg', true ) ) ) {
    	$image_bg = get_post_meta( get_the_ID(), '_image_vertical_bg', true ); 
        $image_id = $image_bg;
        $img_src_full = wp_get_attachment_image_src( $image_id, 'full' );
        $img_src_full = $img_src_full[0];
        $img_src_large = wp_get_attachment_image_src( $image_id, 'large' );
    	$img_src_large = $img_src_large[0];
    	
    	$bg_style = get_post_meta( get_the_ID(), '_vertical_bg_style', true );
    	$bg_style = (!empty($bg_style)) ? $bg_style : 'fixed';
    } else {
    	$image_bg = false;
    	$img_src_full = false;
    	$img_src_large = false;
    	$bg_style = 'none';
    }


    75 is = $img_src_full = $img_src_full[0];
    77 = $img_src_large = $img_src_large[0];

    I hope someone can help me out, thanks in advance!

    Greetings,
    Kevin

Viewing 1 replies (of 1 total)
  • This is from your Angio theme.

    This is just a warning. If you’re seeing it on your live site, that means either you have WordPress debugging turned on, or your server is configured to display PHP error messages publicly.

    Neither of these is a good idea (for both security and performance reasons).

    A warning should not break your site, and it’s something for the developer of the theme to deal with. So the simple solution for you is to turn off WordPress debugging or tweak your PHP config to not display errors publicly.

    But if you really want to deal with the warning itself, then please contact your Angio theme’s vendor, the folks you purchased the theme from.

    They built and sold the theme, and they’re the only ones who can update their commercial product for full PHP compatibility.

    Angio theme support info: https://themeforest.net/item/angio-creative-music-theme/28112718/support

    Good luck

Viewing 1 replies (of 1 total)
  • The topic ‘Trying to access array offset on value of type bool – PHP version 8.1.15’ is closed to new replies.