From 94b77ec490c80f93efddd6d18de8048c46ed9783 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 25 Jun 2014 18:58:47 +0000 Subject: [PATCH] Removing correctely the debug file (only if it exists) git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1488 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- markdown.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/markdown.php b/markdown.php index dbbb45b..94b4724 100644 --- a/markdown.php +++ b/markdown.php @@ -16,7 +16,8 @@ class markdown @param string $mark Message in markdown syntax to display */ public function html ($mark) { - if ($this->debug) unlink ("/tmp/debug"); + if ($this->debug && file_exists ("/tmp/debugMD")) + unlink ("/tmp/debugMD"); $res = ""; $mark = htmlentities ($mark, ENT_QUOTES);