pear / Archive_Tar

Home Page:http://pear.php.net/package/Archive_Tar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.1 compatibility error: Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$trace" was changed on line 69.

harikagujjula opened this issue · comments

Command: ./vendor/bin/phpcs -p vendor/pear --standard=PHPCompatibility --runtime-set testVersion 8.1

There are multiple PHP compatibility errors with debug_backtrace(), (along with multiple warnings). Following are few errors:

pear/archive_tar/tests/phpt_test.php.inc

48 | WARNING | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current
| | value. The parameter "$trace" was used, and possibly changed (by reference), on line 47.

95 | ERROR | Since PHP 7. 0, functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current
| | value. The parameter "$trace" was changed on line 69.

111 | ERROR | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current
| | value. The parameter "$trace" was changed on line 69.

pear/pear-core-minimal/src/PEAR.php

897 | ERROR | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current
| | value. The parameter "$mode" was changed on line 887.

Proposed solution:

  • Add "DEBUG_BACKTRACE_IGNORE_ARGS".

Question: But Why is this considered a warning at some places and few identified as error.
Does anyone have any thoughts/suggestions on this?

Thanks

debug_backtrace isn't used in Archive_Tar itself, only in the test code - hence closing this for now. Thanks.