Download & Extend

Error in session_expire_cron() : DeleteQuery::range() is not supported.

Project:Session expire
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:laurentchardin
Status:needs review

Issue Summary

When hook_cron is called, i am getting the following error:

Fatal error: Call to undefined method DeleteQuery::range() in sites/all/modules/contrib/session_expire/session_expire.module on line 112

Actually, the DeleteQuery object does not support the range() method. So trying to use SESSION_EXPIRE_MAX_DELETIONS is always failing.

Comments

#1

Status:active» needs review

Patch attached with:
- adding missing constants: SESSION_EXPIRE_INTERVAL
- revamped session_expire_cron() method

AttachmentSize
deleteQuery_range_not_supported-1832200-1.patch 2.49 KB

#2

Fixing missing return carriage.

AttachmentSize
deleteQuery_range_not_supported-1832200-2.patch 2.48 KB

#3

Here is an expanded patch that adds the ability to define the interval again into the admin section. I feel like for users with minimal administrative logins (but with aggressive expire times like 15 minutes) you want it to run it during each cron run, instead of only running once a day. This contains all the above work from laurentchardin but adds this back to the admin section. Also I cleaned up a couple of changes that were made to spacing in the original patch.

AttachmentSize
deleteQuery_range_not_supported-1832200-3.patch 3.4 KB