Download & Extend

%s instead of %d in actions_delete()

Project:Actions
Version:5.x-2.6
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active

Issue Summary

In the actions.inc file, the last function, actions_delete(), uses the %d modifier for a varchar column (aid), when it should be %s.

Thus,

function actions_delete($aid) {
  db_query("DELETE FROM {actions} WHERE aid = %d", $aid);
  module_invoke_all('actions_delete', $aid);
}

Becomes,

/**
* Delete a single action from the database.
*
* @param $aid
*   integer The ID of the action to delete.
*/
function actions_delete($aid) {
  db_query("DELETE FROM {actions} WHERE aid = '%s'", $aid);
  module_invoke_all('actions_delete', $aid);
}
nobody click here