mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
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:
parent
d51a748d95
commit
aed1ea790e
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user