From e33c2b8f89d0174b6b2bcbd31d8d89c2ee664340 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= <tobias@hoessl.eu>
Date: Mon, 27 Feb 2012 22:08:00 +0000
Subject: [PATCH] Avoid a Notice

---
 include/items.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/items.php b/include/items.php
index 7d52571c25..5452dfbdab 100755
--- a/include/items.php
+++ b/include/items.php
@@ -682,7 +682,7 @@ function item_store($arr,$force_parent = false) {
 		unset($arr['dsprsig']);
 	}
 
-	if($arr['gravity'])
+	if(x($arr, 'gravity'))
 		$arr['gravity'] = intval($arr['gravity']);
 	elseif($arr['parent-uri'] === $arr['uri'])
 		$arr['gravity'] = 0;
@@ -800,6 +800,8 @@ function item_store($arr,$force_parent = false) {
 				logger('item_store: item parent was not found - ignoring item');
 				return 0;
 			}
+			
+			$parent_deleted = 0;
 		}
 	}