qual: phpstan for htdocs/core/filemanagerdol/connectors/php/connector.lib.php

htdocs/core/filemanagerdol/connectors/php/connector.lib.php	968	Function DetectHtml() should return bool but returns int.
htdocs/core/filemanagerdol/connectors/php/connector.lib.php	1027	Function IsImageValid() should return bool but returns int.
This commit is contained in:
thibdrev 2024-01-31 21:25:45 +01:00 committed by GitHub
parent d51a748d95
commit aed1ea790e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -954,10 +954,9 @@ function IsHtmlExtension($ext, $formExtensions)
/**
* Detect HTML in the first KB to prevent against potential security issue with
* IE/Safari/Opera file type auto detection bug.
* Returns true if file contain insecure HTML code at the beginning.
*
* @param string $filePath absolute path to file
* @return boolean
* @return bool|-1 Returns true if the file contains insecure HTML code at the beginning, or -1 if error
*/
function DetectHtml($filePath)
{
@ -1015,11 +1014,10 @@ function DetectHtml($filePath)
/**
* Check file content.
* Currently this function validates only image files.
* Returns false if file is invalid.
*
* @param string $filePath Absolute path to file
* @param string $extension File extension
* @return boolean True or false
* @return bool|-1 Returns true if the file is valid, false if the file is invalid, -1 if error.
*/
function IsImageValid($filePath, $extension)
{