From 407e65b998d62ef65046facba0d66a5dbbcb2509 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Sat, 15 Oct 2011 10:40:31 +0200 Subject: [PATCH] Treat a whitespace-only page as empty and delete it FS#2283 --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/common.php b/inc/common.php index ec7f9bece..8b92ebcbc 100644 --- a/inc/common.php +++ b/inc/common.php @@ -980,7 +980,7 @@ function saveWikiText($id,$text,$summary,$minor=false){ $file = wikiFN($id); $old = @filemtime($file); // from page - $wasRemoved = empty($text); + $wasRemoved = (trim($text) == ''); // check for empty or whitespace only $wasCreated = !@file_exists($file); $wasReverted = ($REV==true); $newRev = false; -- GitLab