diff options
-rwxr-xr-x | include/items.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php index 60a678d1b..304dab316 100755 --- a/include/items.php +++ b/include/items.php @@ -1624,11 +1624,12 @@ function item_store($arr,$allow_exec = false) { // find the item we just created - $r = q("SELECT `id` FROM `item` WHERE `mid` = '%s' AND `uid` = %d ORDER BY `id` ASC ", + $r = q("SELECT * FROM `item` WHERE `mid` = '%s' AND `uid` = %d ORDER BY `id` ASC ", $arr['mid'], // already dbesc'd intval($arr['uid']) ); + if($r && count($r)) { $current_post = $r[0]['id']; $arr = $r[0]; // This will gives us a fresh copy of what's now in the DB and undo the db escaping, which really messes up the notifications |