From aa9d4a4dbf1bb605cb50b29eb216a9917f647eb4 Mon Sep 17 00:00:00 2001 From: Erwan Date: Mon, 23 Apr 2012 00:10:32 +0200 Subject: [PATCH] PHP Notice Fix (added check) --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 7c35e07a..2610719e 100644 --- a/index.php +++ b/index.php @@ -290,7 +290,7 @@ if (!empty($_SERVER['QUERY_STRING'])) // Display an existing paste. $messages = array($paste); // The paste itself is the first in the list of encrypted messages. // If it's a discussion, get all comments. - if (property_exists($paste->meta, 'opendiscussion')) + if (property_exists($paste->meta, 'opendiscussion') && $paste->meta->opendiscussion) { $comments=array(); $datadir = dataid2discussionpath($dataid); @@ -318,7 +318,7 @@ if (!empty($_SERVER['QUERY_STRING'])) // Display an existing paste. $CIPHERDATA = json_encode($messages); // If the paste was meant to be read only once, delete it. - if (property_exists($paste->meta, 'burnafterreading')) deletePaste($dataid); + if (property_exists($paste->meta, 'burnafterreading') && $paste->meta->burnafterreading) deletePaste($dataid); } } else