use intval rather than dbesc since these are ints. Should work regardless, but this makes it consistent with the way we do most other queries.
This commit is contained in:
parent
864fcd1da6
commit
d2af45d206
@ -218,8 +218,8 @@ function like_content(&$a) {
|
|||||||
// get the item. Allow linked photos (which are normally hidden) to be liked
|
// get the item. Allow linked photos (which are normally hidden) to be liked
|
||||||
|
|
||||||
$r = q("SELECT * FROM item WHERE id = %d and (item_restrict = 0 or item_restrict = %d) LIMIT 1",
|
$r = q("SELECT * FROM item WHERE id = %d and (item_restrict = 0 or item_restrict = %d) LIMIT 1",
|
||||||
dbesc($item_id),
|
intval($item_id),
|
||||||
dbesc(ITEM_HIDDEN)
|
intval(ITEM_HIDDEN)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! $item_id || (! $r)) {
|
if(! $item_id || (! $r)) {
|
||||||
|
Reference in New Issue
Block a user