summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-12-10 14:56:29 +0100
committerAndrew Dolgov <[email protected]>2005-12-10 14:56:29 +0100
commite31073bd820fb1a9591eac0fdbb3318da6b8027e (patch)
tree0b7edb0f985ceb95315660bebc892dd6d46365dd /functions.php
parent87a79fa411f774970254f30e5f3a9f1675a18215 (diff)
fix empty num_comments handling
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/functions.php b/functions.php
index 799ee6c0a..5e789bfae 100644
--- a/functions.php
+++ b/functions.php
@@ -324,12 +324,12 @@
$entry_link = db_escape_string($entry_link);
$entry_comments = db_escape_string($entry_comments);
- $num_comments = 0;
-
- if ($item["slash"]) {
+ if (defined($item["slash"])) {
$num_comments = db_escape_string($item["slash"]["comments"]);
}
+ if (!$num_comments) $num_comments = 0;
+
if (db_num_rows($result) == 0) {
// base post entry does not exist, create it