Karelke
Well-known member
- Affected version
- 2.2.9
On XenForo 2.2.9, the following warnings are present with PHP 8.
Tools used: https://github.com/PHPCompatibility/PHPCompatibility
Tools used: https://github.com/PHPCompatibility/PHPCompatibility
Code:
FILE: /usr/src/myapp/src/XF/Captcha/HCaptcha.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
23 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: '0x47fD9C7F7B1db151F1c0c36a938Ab1BDcDa9CBAA'
| | (PHPCompatibility.Miscellaneous.ValidIntegers.HexNumericStringFound)
Code:
FILE: /usr/src/myapp/src/XF/Authentication/Core12.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
42 | WARNING | The value of the password hash algorithm constants has changed in PHP 7.4. Pass a PHP native constant to the password_hash() function instead of using the value of the constant. Found:
| | $options['algo'] (PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues.NotAlgoConstant)
86 | WARNING | The value of the password hash algorithm constants has changed in PHP 7.4. Pass a PHP native constant to the password_needs_rehash() function instead of using the value of the constant. Found:
| | $options['algo'] (PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues.NotAlgoConstant)
Code:
FILE: /usr/src/myapp/src/XF/Authentication/Core12.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
42 | WARNING | The value of the password hash algorithm constants has changed in PHP 7.4. Pass a PHP native constant to the password_hash() function instead of using the value of the constant. Found:
| | $options['algo'] (PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues.NotAlgoConstant)
86 | WARNING | The value of the password hash algorithm constants has changed in PHP 7.4. Pass a PHP native constant to the password_needs_rehash() function instead of using the value of the constant. Found:
| | $options['algo'] (PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues.NotAlgoConstant)
Code:
FILE: /usr/src/myapp/src/XF/Util/Random.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
112 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
| | (PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved)
112 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
| | (PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved)
112 | ERROR | The constant "MCRYPT_DEV_URANDOM" is deprecated since PHP 7.1 and removed since PHP 7.2 (PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved)
Code:
FILE: /usr/src/myapp/src/XF/Util/Arr.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
202 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$args"
| | was used, and possibly changed (by reference), on line 195. (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection)
Code:
FILE: /usr/src/myapp/src/XF/App.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3088 | ERROR | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$class"
| | was changed on line 3082. (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.Changed)
Code:
FILE: /usr/src/myapp/src/XF/Template/Compiler/Lexer.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
714 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter
| | "$tokens" was used, and possibly changed (by reference), on line 712. (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection)
Code:
FILE: /usr/src/myapp/src/XF/Mvc/Entity/Finder.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
141 | ERROR | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter
| | "$condition" was changed on line 137. (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.Changed)
1448 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter
| | "$column" was used, and possibly changed (by reference), on line 1442. (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection)