‘Creating default object from empty value’ error
-
We have an auto popup on time-delay with a cookie set on popup close to not repeat for 1 month. It displays on all pages of the website
We use the Cerber plugin for security
With Cerber we blocked the access to wp-login.php
With this setup if you go to wp-login.php then the page is blocked (shows error 404) as expected but there is a warning in the error_log for popupmaker:
PHP Warning: Creating default object from empty value in /wp-content/plugins/popup-maker/classes/Site/Popups.php on line 173
So not a real error in the sense that it would be expected that things may not behave correctly on a blocked wp-login.php page however I did find a way to avoid these errors.
I had Cerber set to use this setting ‘use 404 template from active theme’ for the blocked wp-login.php page
If I changed that setting to ‘display simple 404 page’ then popupmaker is no longer logging warnings.
Posting this here in case others are getting the same error. Took me a while to troubleshoot to find which URL was triggering it as it was too intermittent to be from all pages.
- The topic ‘‘Creating default object from empty value’ error’ is closed to new replies.