Change of operator to consider empty files

Was giving false positives on false, !==false is what we require here
This commit is contained in:
Matt Pass
2013-02-09 15:42:20 +00:00
parent 0dd9535a5b
commit 82e3698dd2

View File

@@ -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 '<script>fileType="text";';
echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
echo '</script>';