Skip to content

Commit

Permalink
Fix 2 (int) casts in FinderIndexer::remove() where it is done to $db-…
Browse files Browse the repository at this point in the history
…>quote($linkId). It should be casted inside $db->quote() instead.
  • Loading branch information
cheryeong committed Mar 20, 2012
1 parent de0e237 commit 6aa7add
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ public static function remove($linkId)
$query->update($db->quoteName('#__finder_terms') . ' AS t');
$query->join('INNER', $db->quoteName('#__finder_links_terms' . dechex($i)) . ' AS m ON m.term_id = t.term_id');
$query->set($db->quoteName('t'). '.' . $db->quoteName('links') . ' ='. $db->quoteName('t') .'.' . $db->quoteName('links') . ' - 1');
$query->where($db->quoteName('m') . '.' . $db->quoteName('link_id') . ' = ' . (int) $db->quote($linkId));
$query->where($db->quoteName('m') . '.' . $db->quoteName('link_id') . ' = ' . $db->quote((int) $linkId));
$db->setQuery($query);
$db->query();

Expand Down Expand Up @@ -884,7 +884,7 @@ public static function remove($linkId)
$query->clear();
$query->delete();
$query->from($db->quoteName('#__finder_links'));
$query->where($db->quoteName('link_id') . ' = ' . (int) $db->quote($linkId));
$query->where($db->quoteName('link_id') . ' = ' . $db->quote((int) $linkId));
$db->setQuery($query);
$db->query();

Expand Down

0 comments on commit 6aa7add

Please sign in to comment.