The implementation of hook_cron() has a few critical flaws. First, the code comment to "Run Session API hook first" implies that the session_api_session_api_cleanup() function should be run first, followed by other module cleanups. However, it simply uses array_unshift() to pop off the first item. If Flag module were to provide Session API support, it would actually become the first item in the list, since the modules are sorted alphabetically.

Secondly, the function "session_api_session_api_cleanup" is never actually run separately. So the cleanup of Session IDs never occurs.

CommentFileSizeAuthor
session_api_cron.patch844 bytesquicksketch

Comments

quicksketch’s picture

Priority: Critical » Normal
Status: Needs review » Closed (fixed)

Oh silly me. I was thinking of "array_shift", not array_unshift(). The code is just fine. :P