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
|
|
@ -3006,7 +3006,7 @@ function htmlEncode2($string) {
|
|||
|
||||
// --------------
|
||||
// This function HTML-encodes a string with *htmlspecialchars* to print it on a page.
|
||||
// Only some special characters are encoded, otherwise special characters (e.g. é) appear encoded (é).
|
||||
// Only some special characters are encoded, otherwise special characters (e.g. ) appear encoded (é).
|
||||
// --------------
|
||||
|
||||
$isocode = __("iso-8859-1");
|
||||
|
|
@ -3377,7 +3377,7 @@ $AttmFiles ... array containing the filenames to attach like array("file1","file
|
|||
|
||||
// Attachments
|
||||
if($AttmFiles){
|
||||
foreach($AttmFiles as $AttmFile){
|
||||
foreach ((array)$AttmFiles as $AttmFile){
|
||||
// $patharray = explode ("/", $AttmFile);
|
||||
// $FileName=$patharray[sizeof($patharray)-1];
|
||||
$FileName = "RequestedFile.zip";
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
// gzip tools and WinZip application.
|
||||
//
|
||||
// Description :
|
||||
// See readme.txt (English & Français) and http://www.phpconcept.net
|
||||
// See readme.txt (English & Franais) and http://www.phpconcept.net
|
||||
//
|
||||
// Warning :
|
||||
// This library and the associated files are non commercial, non professional
|
||||
|
|
@ -405,7 +405,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
// $p_filelist, in the directory
|
||||
// $p_path. The relative path of the archived files are keep and become
|
||||
// relative to $p_path.
|
||||
// If a directory is spécified in the list, all the files from this directory
|
||||
// If a directory is spcified in the list, all the files from this directory
|
||||
// will be extracted.
|
||||
// If a file with the same name already exists it will be replaced.
|
||||
// If the path to the file does not exist, it will be created.
|
||||
|
|
@ -1349,7 +1349,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
}
|
||||
|
||||
// ----- Loop on the files
|
||||
for ($j=0; ($j<count($p_list)) && ($v_result==1); $j++)
|
||||
for ($j=0; ($j<count((array)$p_list)) && ($v_result==1); $j++)
|
||||
{
|
||||
// ----- Recuperate the filename
|
||||
$p_filename = $p_list[$j];
|
||||
|
|
@ -2031,7 +2031,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
// ----- Look if the extracted file is older
|
||||
else if (filemtime($v_header[filename]) > $v_header[mtime])
|
||||
{
|
||||
TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is newer (".date("l dS of F Y h:i:s A", filemtime($v_header[filename])).") than the extracted file (".date("l dS of F Y h:i:s A", $v_header[mtime]).")");
|
||||
TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is newer (".date("l dS of F Y h:i:s A", filemtime($v_header[filename])).") than the extracted file (".date("l dS of F Y h:i:s A", is_numeric($v_header[mtime]) ? (int)$v_header[mtime] : strtotime($v_header[mtime])).")");
|
||||
|
||||
// ----- Change the file status
|
||||
$v_header[status] = "newer_exist";
|
||||
|
|
@ -2164,7 +2164,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
else
|
||||
gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512));
|
||||
|
||||
TrFctMessage(__FILE__, __LINE__, 4, "Position après jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]");
|
||||
TrFctMessage(__FILE__, __LINE__, 4, "Position aprs jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]");
|
||||
}
|
||||
|
||||
if ($p_tar_mode == "tar")
|
||||
|
|
@ -2395,7 +2395,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
else
|
||||
gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512));
|
||||
|
||||
TrFctMessage(__FILE__, __LINE__, 4, "Position après jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]");
|
||||
TrFctMessage(__FILE__, __LINE__, 4, "Position aprs jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]");
|
||||
}
|
||||
|
||||
if ($p_tar_mode == "tar")
|
||||
|
|
@ -2514,7 +2514,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
// ----- Look if the extracted file is older
|
||||
else if (filemtime($v_header[filename]) > $v_header[mtime])
|
||||
{
|
||||
TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is newer (".date("l dS of F Y h:i:s A", filemtime($v_header[filename])).") than the extracted file (".date("l dS of F Y h:i:s A", $v_header[mtime]).")");
|
||||
TrFctMessage(__FILE__, __LINE__, 2, "Existing file '$v_header[filename]' is newer (".date("l dS of F Y h:i:s A", filemtime($v_header[filename])).") than the extracted file (".date("l dS of F Y h:i:s A", is_numeric($v_header[mtime]) ? (int)$v_header[mtime] : strtotime($v_header[mtime])).")");
|
||||
|
||||
// ----- Change the file status
|
||||
$v_header[status] = "newer_exist";
|
||||
|
|
@ -2836,7 +2836,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
else
|
||||
gzseek($v_tar, gztell($v_tar)+(ceil(($v_header[size]/512))*512));
|
||||
|
||||
TrFctMessage(__FILE__, __LINE__, 4, "Position après jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]");
|
||||
TrFctMessage(__FILE__, __LINE__, 4, "Position aprs jump [".($p_tar_mode=="tar"?ftell($v_tar):gztell($v_tar))."]");
|
||||
}
|
||||
|
||||
// ----- Look for end of file
|
||||
|
|
@ -3058,7 +3058,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
{
|
||||
TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' is present in archive");
|
||||
TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' mtime=".filemtime($p_file_list[$i])." ".date("l dS of F Y h:i:s A", filemtime($p_file_list[$i])));
|
||||
TrFctMessage(__FILE__, __LINE__, 3, "Archived mtime=".$v_header[mtime]." ".date("l dS of F Y h:i:s A", $v_header[mtime]));
|
||||
TrFctMessage(__FILE__, __LINE__, 3, "Archived mtime=".$v_header[mtime]." ".date("l dS of F Y h:i:s A", is_numeric($v_header[mtime]) ? (int)$v_header[mtime] : strtotime($v_header[mtime])));
|
||||
|
||||
// ----- Store found informations
|
||||
$v_found_file = TRUE;
|
||||
|
|
@ -3372,7 +3372,7 @@ $g_pcltar_extension = substr(strrchr(basename(__FILE__), '.'), 1);
|
|||
$v_header[size] = OctDec(trim($v_data[size]));
|
||||
TrFctMessage(__FILE__, __LINE__, 2, "Size : '$v_header[size]'");
|
||||
$v_header[mtime] = OctDec(trim($v_data[mtime]));
|
||||
TrFctMessage(__FILE__, __LINE__, 2, "Date : ".date("l dS of F Y h:i:s A", $v_header[mtime]));
|
||||
TrFctMessage(__FILE__, __LINE__, 2, "Date : ".date("l dS of F Y h:i:s A", is_numeric($v_header[mtime]) ? (int)$v_header[mtime] : strtotime($v_header[mtime])));
|
||||
if (($v_header[typeflag] = $v_data[typeflag]) == "5")
|
||||
{
|
||||
$v_header[size] = 0;
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@
|
|||
|
||||
// ----- Reformat the string list
|
||||
if (sizeof($v_string_list) != 0) {
|
||||
foreach ($v_string_list as $v_string) {
|
||||
foreach ((array)$v_string_list as $v_string) {
|
||||
if ($v_string != '') {
|
||||
$v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
|
||||
}
|
||||
|
|
@ -389,7 +389,7 @@
|
|||
,PCLZIP_ATT_FILE_CONTENT => 'optional'
|
||||
,PCLZIP_ATT_FILE_COMMENT => 'optional'
|
||||
);
|
||||
foreach ($v_att_list as $v_entry) {
|
||||
foreach ((array)$v_att_list as $v_entry) {
|
||||
$v_result = $this->privFileDescrParseAtt($v_entry,
|
||||
$v_filedescr_list[],
|
||||
$v_options,
|
||||
|
|
@ -558,7 +558,7 @@
|
|||
|
||||
// ----- Reformat the string list
|
||||
if (sizeof($v_string_list) != 0) {
|
||||
foreach ($v_string_list as $v_string) {
|
||||
foreach ((array)$v_string_list as $v_string) {
|
||||
$v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
|
||||
}
|
||||
}
|
||||
|
|
@ -572,7 +572,7 @@
|
|||
,PCLZIP_ATT_FILE_CONTENT => 'optional'
|
||||
,PCLZIP_ATT_FILE_COMMENT => 'optional'
|
||||
);
|
||||
foreach ($v_att_list as $v_entry) {
|
||||
foreach ((array)$v_att_list as $v_entry) {
|
||||
$v_result = $this->privFileDescrParseAtt($v_entry,
|
||||
$v_filedescr_list[],
|
||||
$v_options,
|
||||
|
|
@ -1872,7 +1872,7 @@
|
|||
$v_result=1;
|
||||
|
||||
// ----- For each file in the list check the attributes
|
||||
foreach ($p_file_list as $v_key => $v_value) {
|
||||
foreach ((array)$p_file_list as $v_key => $v_value) {
|
||||
|
||||
// ----- Check if the option is supported
|
||||
if (!isset($v_requested_options[$v_key])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue