• Resolved HelgaTheViking

    (@helgatheviking)


    Frontend:

    Notice: Trying to access array offset on value of type bool in C:\Users\helga\Local Sites\sandbox\app\public\wp-content\plugins\wpstream\wpstream.php on line 89

    Issue appears to be from calling $share_img[0] when $share_img does not return a value.

    I would probably consider updating to something like:

    add_action('wp_head', 'wpestate_add_custom_meta_to_header');
    
    function wpestate_add_custom_meta_to_header(){
        global $post;
    
        if ( is_singular('product') || is_singular('wpstream_product') ) {
            $share_img      =   get_the_post_thumbnail_url( $post, 'full' ); ?>
    
            <meta property='og:title' content="<?php print esc_html(get_the_title($post->ID)); ?>"/>
            <meta property="og:image" content="<?php print esc_url($share_img); ?>"/>
            <meta property="og:image:secure_url" content="<?php print esc_url($share_img); ?>" />
            <meta property="og:description"  content=" <?php print wp_strip_all_tags( $post->post_content);?>" />
        <?php }
    
    }
    

    Admin:

    Notice: Undefined index: default in C:\Users\helga\Local Sites\sandbox\app\public\wp-content\plugins\wpstream\admin\class-wpstream-admin.php on line 852

    `

    and lastly, I noticed that the wpstream_hide_buy_now_subscription_mode function has a variable called $subscription_model = esc_html( get_option('wpstream_global_sub',true)) ; and this is returning 1 even when the plugin is newly installed and has no options saved. So the admin shows “global subscriptions” as off, but the front-end behaves as if it’s true.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wpstream

    (@wpstream)

    Hello there,

    Thank you for your message. Unfortunately, I am unable to help with technical issues through this medium. Please post on our forum or get in contact with [email protected] as our engineers are constantly checking and you will be responded to as soon as possible.

    Thread Starter HelgaTheViking

    (@helgatheviking)

    I don’t need your help resolving this. I noticed it while working on compatibility, so I’m just reporting it so you can fix it.

    Plugin Author wpstream

    (@wpstream)

    Hello helgatheviking,

    Thank you for sending this across, we appreciate the help and the fix will be implemented with our next update ??

    Have a lovely day ahead!

    Thread Starter HelgaTheViking

    (@helgatheviking)

    Sounds great! Thank you and same to you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP notices on frontend and admin’ is closed to new replies.