Hello,
We apologize for the issue you are facing with the warning message on your local site. The "Undefined array key ‘day’" warning typically indicates that the code is trying to access an array key that does not exist. This can happen due to various reasons, such as a plugin conflict or an issue with the theme.
To resolve this issue, we recommend the following steps:
- Update Plugins and Themes: Ensure that all your plugins and themes are updated to their latest versions. Sometimes, these warnings can be resolved with updates that fix underlying issues.
- Check for Plugin Conflicts: Deactivate all plugins except Rank Math and see if the warning persists. If it goes away, reactivate the plugins one by one to identify which one is causing the conflict.
- Review Your Code: If you are comfortable with PHP, you can check the specified line in the
class-local-seo.php
file to see if there is a way to add a check for the existence of the ‘day’ key before accessing it.
- Consult Our Troubleshooting Guide: You can follow our troubleshooting guide for more detailed steps on resolving plugin conflicts.
If you continue to experience this issue after trying these steps, please reply to this ticket with your site URL so that a human agent from our support team can assist you further. Thank you for bringing this to our attention!
Sources:
How to Fix Undefined Offset: 0 Warning » Rank Math
Hello,
Please head over to your WP Dashboard > Rank Math > Titles & Meta > Local SEO and from there make sure you’ve properly set the Opening Hours:

You can also share a screenshot of this part from your website so that we can check the issue further for you. You can use any image-sharing tool like https://imgur.com/upload to share the screenshot with us.
Let us know how it goes. Looking forward to helping you.
Thank you.
Thanks a lot for your reply!
Yes, this was the problem. My hours didn’t have the right format. I still don’t know how to set that I’m open 24/7 but removing all the days fixed the problem.
Hello,
That option is only available if you enable the multiple locations option from our plugin: https://rankmath.com/kb/multiple-locations/
The option is available inside the locations CPT created after enabling it when editing the Schema settings, as shown here:

If don’t want to use multiple locations option, you can set the Opening Hours to this format as this is equivalent to 24/7

Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Thank you all for your help!
Hello,
We’re delighted to hear that this issue has been resolved. We appreciate your feedback.
This ticket will be closed now, but if you ever have another question or need any help in the future, please don’t hesitate to create a new forum topic. We’ll be more than happy to assist you again.
Thank you.