# HG changeset patch # User Matti Hamalainen # Date 1416861068 -7200 # Node ID 5f20e5f1d589837aefc7c080bbdd0f4837daa2c6 # Parent 41f7ab5eddc35f5127bc8ce2bfc44420b6b6b962 Log errors. diff -r 41f7ab5eddc3 -r 5f20e5f1d589 msite.inc.php --- a/msite.inc.php Mon Nov 24 21:35:15 2014 +0200 +++ b/msite.inc.php Mon Nov 24 22:31:08 2014 +0200 @@ -997,7 +997,10 @@ // Get file magic info if (($finfo = finfo_open()) === false) - return stError("Internal error. Failed to initialize finfo()."); + { + error_log("Internal error. Failed to initialize finfo().\n"); + return stError("Internal error, failed to probe file."); + ); $sdata = @finfo_file($finfo, $filename, FILEINFO_NONE); $smime = @finfo_file($finfo, $filename, FILEINFO_MIME_TYPE); @@ -1005,7 +1008,10 @@ // Did we get anything? if ($sdata === FALSE || $smime === FALSE) + { + error_log("Failed to probe file '".$filename."'.\n"); return stError("Internal error, failed to probe file."); + } // Match through our supported types .. foreach ($previewFileTypeList as $fid => $fdata)