Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] Warning: Undefined array key “medium” in /homepages

Simple Membership Plugin › Forums › Simple Membership Plugin › Warning: Undefined array key “medium” in /homepages

  • This topic has 2 replies, 2 voices, and was last updated 4 years, 2 months ago by Keith.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 14, 2022 at 2:48 pm #24109
    Keith
    Participant

    My site is displaying errors on tablets and phones, but not on PCs.

    The error messages are:
    Warning: Undefined array key “thumbnail” in /homepages/6/d904060234/htdocs/clickandbuilds/HuntsBKA618938/wp-content/plugins/simple-membership/classes/class.simple-wp-membership.php on line 188
    and
    Warning: Undefined array key “medium” in /homepages/6/d904060234/htdocs/clickandbuilds/HuntsBKA618938/wp-content/plugins/simple-membership/classes/class.simple-wp-membership.php on line 192

    Starting at line 187 in the class.simple-wp-membership.php file, the code is:
    187 if (isset($content[‘sizes’])) {
    188 if ($content[‘sizes’][‘thumbnail’]) {
    $content[‘sizes’][‘thumbnail’][‘file’] = ‘restricted-icon.png’;
    $content[‘sizes’][‘thumbnail’][‘mime-type’] = ‘image/png’;
    }
    192 if ($content[‘sizes’][‘medium’]) {
    $content[‘sizes’][‘medium’][‘file’] = ‘restricted-icon.png’;
    $content[‘sizes’][‘medium’][‘mime-type’] = ‘image/png’;
    }
    if (isset($content[‘sizes’][‘post-thumbnail’])) {
    $content[‘sizes’][‘post-thumbnail’][‘file’] = ‘restricted-icon.png’;
    $content[‘sizes’][‘post-thumbnail’][‘mime-type’] = ‘image/png’;

    The page has Stackable Accordian Blocks, and where the (description) text block would normally occur, I have replaced the Text block with a 2 column container and in the 1st column inserted an image block.

    If I remove the images, then there are no errors, but even with the error messages the Accordian blocks display correctly, but just with these 2 error messages at the top of the page, both sides of the title block.

    I’m hoping that someone can help me stop these error messages appearing.

    Thanks

    July 15, 2022 at 7:46 am #24110
    admin
    Keymaster

    Hi, I have added a condition in that code so it doesn’t produce the errors when it fails to find it. The code change for this will go out with the next release.

    July 15, 2022 at 8:28 am #24111
    Keith
    Participant

    Thanks for that speedy response.

    I’ve discovered that when using a PC or laptop to access the website, the messages don’t appear when I am logged in as Administrator, but does when logged in as a Subscriber.

    If accessing using a Samsung Mobile, then the message always appears, even when logged in as an Administrator.

    Don’t know if that helps?

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy