From 82e3698dd20d421418cb418b9fd3ada8e4dac04d Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 9 Feb 2013 15:42:20 +0000 Subject: [PATCH] Change of operator to consider empty files Was giving false positives on false, !==false is what we require here --- lib/file-control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/file-control.php b/lib/file-control.php index 643dbf3..f98f63b 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -23,7 +23,7 @@ if ($_GET['action']=="load") { if (file_exists($file)) { // Determine what to do based on mime type $finfo = finfo_open(FILEINFO_MIME_TYPE); - if (strpos(finfo_file($finfo, $file),"text")===0 || strpos(finfo_file($finfo, $file),"empty")>=0) { + if (strpos(finfo_file($finfo, $file),"text")===0 || strpos(finfo_file($finfo, $file),"empty")!==false) { echo '';