Notice: Trying to get property of non-object in RedisLog->getMultiple() (line 64 of /home/timmillwood/sites/drupal/sites/all/modules/redis_watchdog/RedisLog.php).

Comments

msonnabaum’s picture

Status: Active » Postponed (maintainer needs more info)

Gonna need a bit more context here.

Where there any logs when this happened? Hard to imagine it got into the loop but didn't have an object.

timmillwood’s picture

This was when viewing the log for the first time, there was one item in the log. Not had the issues since.

fgm’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active

Same here. As for Tim, this happened right after enabling the module and flushing cache. PHP 5.4.30 / 7.x HEAD of today. redis.module 7.2.11.

This also happens independently of the module enabling, after doing a FLUSHDB in redis-cli to drop the DB.

Note that consequences of this are:

  • the presence of a lot of blank, non-clickable rows in the table.
  • data formatting warnings further down, when trying to format the missing dates

To a certain extent, there is a logic problem in this getMultiple() method: it overwrites the list of types in drupal:watchdog:types with the list of types present in the limit excerpt of the log being loaded within $limit entries. However, the log may contain lots of other types of messages and, since the form submission is a complete form, it is impossible to filter by a specific type of log entry which is known to be present in messages further down the hash, since they are not being offered because of this limit.

Within the limits of the chosen storage structure, it could be better to allow types to accumulate over time, allowing more flexible filtering, possibly adding a "clear types list" button to reset it.

fgm’s picture

StatusFileSize
new3.52 MB
paranojik’s picture

StatusFileSize
new1.55 KB

The problem is that there is no check if there's anything in the log at all but a range of keys is always queried.

paranojik’s picture

Status: Active » Needs review
perignon’s picture

Status: Needs review » Fixed

Fixed in dev.

Status: Fixed » Closed (fixed)

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