'Notice: Trying to access array offset on value of type bool' appearing frequently

Lee Collings's Avatar

Lee Collings

06 Aug, 2021 09:01 AM

Hi there,

It's been a while since I last raised an issue so I would like to say thanks for the plugin, and your work on it!

I do have a niggle though, whenever running sites with WP_DEBUG set to true, most of the time when loading a page with a slider on it, I will see warning notices like the following:

Notice: Trying to access array offset on value of type bool in /home/sites/8b/f/f56ad8a1ec/staging_html/wp-content/plugins/new-royalslider/classes/NewRoyalSliderMain.php on line 548
Notice: Trying to access array offset on value of type bool in /home/sites/8b/f/f56ad8a1ec/staging_html/wp-content/plugins/new-royalslider/classes/NewRoyalSliderMain.php on line 549
Notice: Trying to access array offset on value of type bool in /home/sites/8b/f/f56ad8a1ec/staging_html/wp-content/plugins/new-royalslider/classes/NewRoyalSliderMain.php on line 548
Notice: Trying to access array offset on value of type bool in /home/sites/8b/f/f56ad8a1ec/staging_html/wp-content/plugins/new-royalslider/classes/NewRoyalSliderMain.php on line 549

I have noticed this on several sites, but usually refreshing clears it. However, I would really like to know why this happens first, and also if you're aware of it, or can do anything that could fix it?

I understand it's just a notice, but if you're anything like me, I always like to be able to clear any notices when using DEBUG mode.

Is there anything here you can look into to find out what's happening? Please feel free to ask anything, I'll be more than happy to help.

  1. Support Staff 1 Posted by Dmitry Semenov on 06 Aug, 2021 03:18 PM

    Dmitry Semenov's Avatar

    Hello,

    Assuming that you're using the latest version (3.4.1).

    This could mean that there is something wrong with default WordPress image resizing. Can you please show what do you have in Image Options section (on Edit Slider page), and do you use any custom PHP code to adjust image sizes?

  2. 2 Posted by Lee Collings on 12 Aug, 2021 08:16 AM

    Lee Collings's Avatar

    RoyalSlider version is 3.4.1, yes.

    Attached screenshot is what I have in the Image Options, so I've set a custom image size (which matches the size of the original images).

    I sense that you're going to suggest removing them to force it to always use the 'Large' size images?

  3. Support Staff 3 Posted by Dmitry Semenov on 12 Aug, 2021 12:26 PM

    Dmitry Semenov's Avatar

    I'll investigate what might be causing this, but yes - try using WordPress image sizes.

    You mentioned that you want the same size as originally uploaded images, this can be done like this - http://help.dimsemenov.com/kb/wordpress-royalslider-advanced/wp-usi...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Screenshot_2021-08-06_at_10.00.43.png 2.35 MB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac