Getting the following notice and warnings when viewing the 404 reports page.

Notice: Trying to get property of non-object in pagenotfound_reports_top_404s() (line 114 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/sites/all/modules/pagenotfound_reports/pagenotfound_reports.module).
Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1909 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1919 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/includes/common.inc).

Comments

bryancasler’s picture

These ones when viewing the referrers tab.

Notice: Trying to get property of non-object in pagenotfound_reports_referers() (line 185 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/sites/all/modules/pagenotfound_reports/pagenotfound_reports.module).
Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1909 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1919 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/includes/common.inc).

bryancasler’s picture

These ones when viewing the "All 404's" tabs

Notice: Trying to get property of non-object in pagenotfound_reports_all() (line 257 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/sites/all/modules/pagenotfound_reports/pagenotfound_reports.module).
Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1909 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1919 of /mnt/stor2-wc1-dfw1/394720/531573/www.nachosyllabus.com/web/content/includes/common.inc).
BrockBoland’s picture

The problem here is that you don't have any 404 errors in your watchdog table. This isn't a condition we accounted for in the module: it assumes that it will get at least one 404 error from the log, and that the "Oldest 404 error" timestamp will be available.

I updated the dev branch to handle this condition. The fix will be in the next version.

I need to check if this is also an issue in D6: #1210628: Properly handle a watchdog with no 404 errors

BrockBoland’s picture

Status: Active » Fixed
bryancasler’s picture

That looks like it fixed it, but I also have 404's now. I'll open this back up if it re-occurs.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.