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.
-
AuthorPosts
-
July 14, 2022 at 2:48 pm #24109
Keith
ParticipantMy 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 192Starting 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 #24110admin
KeymasterHi, 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 #24111Keith
ParticipantThanks 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?
-
AuthorPosts
- You must be logged in to reply to this topic.