PHP8.1 Syntax/Functionality Changes & Deprecations List Check

This commit is contained in:
kjh
2022-05-24 08:44:52 +00:00
parent 0b90f9d631
commit 0edbdab1d8
3 changed files with 10 additions and 10 deletions

View File

@ -534,7 +534,7 @@ class PHPExcel_Calculation_DateTime
if ($testVal2 !== false) { if ($testVal2 !== false) {
$testVal3 = strtok('- '); $testVal3 = strtok('- ');
if ($testVal3 === false) { if ($testVal3 === false) {
$testVal3 = strftime('%Y'); $testVal3 = date('Y');
} }
} else { } else {
return PHPExcel_Calculation_Functions::VALUE(); return PHPExcel_Calculation_Functions::VALUE();
@ -554,16 +554,16 @@ class PHPExcel_Calculation_DateTime
if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) {
// Execute function // Execute function
if ($PHPDateArray['year'] == '') { if ($PHPDateArray['year'] == '') {
$PHPDateArray['year'] = strftime('%Y'); $PHPDateArray['year'] = date('Y');
} }
if ($PHPDateArray['year'] < 1900) { if ($PHPDateArray['year'] < 1900) {
return PHPExcel_Calculation_Functions::VALUE(); return PHPExcel_Calculation_Functions::VALUE();
} }
if ($PHPDateArray['month'] == '') { if ($PHPDateArray['month'] == '') {
$PHPDateArray['month'] = strftime('%m'); $PHPDateArray['month'] = date('m');
} }
if ($PHPDateArray['day'] == '') { if ($PHPDateArray['day'] == '') {
$PHPDateArray['day'] = strftime('%d'); $PHPDateArray['day'] = date('d');
} }
$excelDateValue = floor( $excelDateValue = floor(
PHPExcel_Shared_Date::FormattedPHPToExcel( PHPExcel_Shared_Date::FormattedPHPToExcel(

View File

@ -66,7 +66,7 @@ class ntlm_sasl_client_class
public function NTLMResponse($challenge, $password) public function NTLMResponse($challenge, $password)
{ {
$unicode = $this->ASCIIToUnicode($password); $unicode = $this->ASCIIToUnicode($password);
$md4 = mhash(MHASH_MD4, $unicode); $md4 = hash('md4', $unicode, true);
$padded = $md4 . str_repeat(chr(0), 21 - strlen($md4)); $padded = $md4 . str_repeat(chr(0), 21 - strlen($md4));
$iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB); $iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

View File

@ -171,10 +171,10 @@ class KCAPTCHA{
if($sx<0 || $sy<0 || $sx>=$width-1 || $sy>=$height-1){ if($sx<0 || $sy<0 || $sx>=$width-1 || $sy>=$height-1){
continue; continue;
}else{ }else{
$color=imagecolorat($img, $sx, $sy) & 0xFF; $color=imagecolorat($img, (int)$sx, (int)$sy) & 0xFF;
$color_x=imagecolorat($img, $sx+1, $sy) & 0xFF; $color_x=imagecolorat($img, (int)$sx+1, (int)$sy) & 0xFF;
$color_y=imagecolorat($img, $sx, $sy+1) & 0xFF; $color_y=imagecolorat($img, (int)$sx, (int)$sy+1) & 0xFF;
$color_xy=imagecolorat($img, $sx+1, $sy+1) & 0xFF; $color_xy=imagecolorat($img, (int)$sx+1, (int)$sy+1) & 0xFF;
} }
if($color==255 && $color_x==255 && $color_y==255 && $color_xy==255){ if($color==255 && $color_x==255 && $color_y==255 && $color_xy==255){
@ -204,7 +204,7 @@ class KCAPTCHA{
$newblue=$newcolor0*$foreground_color[2]+$newcolor*$background_color[2]; $newblue=$newcolor0*$foreground_color[2]+$newcolor*$background_color[2];
} }
imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newred, $newgreen, $newblue)); imagesetpixel($img2, (int)$x, (int)$y, imagecolorallocate($img2, (int)$newred, (int)$newgreen, (int)$newblue));
} }
} }