Apply automated PHP8 safety transforms
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
aca850b6cd
commit
e44519c030
465 changed files with 1716 additions and 1716 deletions
|
|
@ -44,7 +44,7 @@ function GetFolders( $resourceType, $currentFolder )
|
|||
echo "<Folders>" ;
|
||||
|
||||
natcasesort( $aFolders ) ;
|
||||
foreach ( $aFolders as $sFolder )
|
||||
foreach ((array)$aFolders as $sFolder)
|
||||
echo $sFolder ;
|
||||
|
||||
// Close the "Folders" node.
|
||||
|
|
@ -89,7 +89,7 @@ function GetFoldersAndFiles( $resourceType, $currentFolder )
|
|||
natcasesort( $aFolders ) ;
|
||||
echo '<Folders>' ;
|
||||
|
||||
foreach ( $aFolders as $sFolder )
|
||||
foreach ((array)$aFolders as $sFolder)
|
||||
echo $sFolder ;
|
||||
|
||||
echo '</Folders>' ;
|
||||
|
|
@ -98,7 +98,7 @@ function GetFoldersAndFiles( $resourceType, $currentFolder )
|
|||
natcasesort( $aFiles ) ;
|
||||
echo '<Files>' ;
|
||||
|
||||
foreach ( $aFiles as $sFiles )
|
||||
foreach ((array)$aFiles as $sFiles)
|
||||
echo $sFiles ;
|
||||
|
||||
echo '</Files>' ;
|
||||
|
|
|
|||
|
|
@ -195,10 +195,10 @@ function IsAllowedExt( $sExtension, $resourceType )
|
|||
$arAllowed = $Config['AllowedExtensions'][$resourceType] ;
|
||||
$arDenied = $Config['DeniedExtensions'][$resourceType] ;
|
||||
|
||||
if ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) )
|
||||
if ( count((array)$arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) )
|
||||
return false ;
|
||||
|
||||
if ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) )
|
||||
if ( count((array)$arDenied) > 0 && in_array( $sExtension, $arDenied ) )
|
||||
return false ;
|
||||
|
||||
return true ;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ function IsHtmlExtension( $ext, $htmlExtensions )
|
|||
return false ;
|
||||
}
|
||||
$lcaseHtmlExtensions = array() ;
|
||||
foreach ( $htmlExtensions as $key => $val )
|
||||
foreach ((array)$htmlExtensions as $key => $val )
|
||||
{
|
||||
$lcaseHtmlExtensions[$key] = strtolower( $val ) ;
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ function DetectHtml( $filePath )
|
|||
|
||||
$tags = array( '<body', '<head', '<html', '<img', '<pre', '<script', '<table', '<title' ) ;
|
||||
|
||||
foreach( $tags as $tag )
|
||||
foreach ((array)$tags as $tag)
|
||||
{
|
||||
if( false !== strpos( $chunk, $tag ) )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue