Download & Extend

Use proper placeholder arrays for IN clause queries

Project:Session API
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

This applies to both Drupal 6 and Drupal 7 versions of Session API although the syntax is different since db_placeholders() was deprecated in Drupal 7.

This query call in session_api_cron() should use proper placeholder logic

See:
(Drupal 6) http://api.drupal.org/api/drupal/includes--database.inc/function/db_plac...
(Drupal 7) http://drupal.org/node/310072

db_query('DELETE FROM {session_api} WHERE sid IN (' . implode(',', $outdated_sids) . ')');
AttachmentSize
drupal7-db-placeholders.patch487 bytes
drupal6-db-placeholders.patch500 bytes

Comments

#1

Status:needs review» fixed

Thanks for the issue and the patches, committed to 6 and 7.

#2

Status:fixed» closed (fixed)

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

#3

Version:7.x-1.x-dev» 6.x-1.x-dev
Status:closed (fixed)» needs review

As noted in #1058960: Use an expiration logic when clearing sessions on cron in comment #22 I left out the $outdated_sids array from the patch for d6. Re-rolled with the right code now.

AttachmentSize
1271398-fix_db_placeholders.patch 530 bytes
nobody click here