minor warning adjustments

This commit is contained in:
Chris
2023-10-15 20:17:56 +02:00
parent d3d5d1c385
commit a1bc5b5fa5
2 changed files with 7 additions and 1 deletions

View File

@@ -26,7 +26,10 @@ else if(!isFolderWritable(ROOT.DS.'tmp'))
// check if client has permission to upload
executeUploadPermission();
$hash = sanatizeString(trim($_REQUEST['hash']))?sanatizeString(trim($_REQUEST['hash'])):false;
if(isset($_REQUEST['hash']))
$hash = sanatizeString(trim($_REQUEST['hash']));
else
$hash = false;
// check for POST upload
if ($_FILES['file']["error"] == UPLOAD_ERR_OK)

View File

@@ -319,6 +319,9 @@ class ImageController implements ContentController
function shouldAlwaysBeWebp()
{
//sanity check
if(!$_SERVER['HTTP_ACCEPT']) return false;
if(defined('ALWAYS_WEBP') && ALWAYS_WEBP && strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false )
return true;
else