In the file session_expire.module at line 97 there was a typo breaking the entire website:

  // Delete the sessions
  $max_deletions = (int) variable_get(SESSION_EXPIRE_MAX_DELETIONS, 1000);
  if ($max_deletions > 0) {
    $result = db_query_range($sql, 0, $max_deletions);
  else {
    $result = db_query($sql);
  }

The logical fixed version is this:

  // Delete the sessions
  $max_deletions = (int) variable_get(SESSION_EXPIRE_MAX_DELETIONS, 1000);
  if ($max_deletions > 0) {
    $result = db_query_range($sql, 0, $max_deletions);}
  else {
    $result = db_query($sql);
  }

Comments

greggles’s picture

Title: Typo problem breaking entire functionality » Fatal error parsing session_expire code

The problem is a need for a closing } on the if statement. It was hard to spot because you put it on the end of the line instead of the beginning of the next line in the way Drupal expects it.

Thanks for your bug report and for helping make this a better module. Could you provide this as a patch?

kndr’s picture

Status: Active » Needs review
StatusFileSize
new460 bytes

Here is the patch.

xurizaemon’s picture

Status: Needs review » Reviewed & tested by the community

*waves +2 wand of RTBC, gets it caught in cobwebs*

  • Commit 432b788 on 6.x-1.x authored by kndr, committed by deekayen:
    Issue #1412936 by kndr | sucka666: Fatal error parsing session_expire...
deekayen’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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