mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-11 18:56:21 +00:00
minor warning adjustments
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user