Skip to content

fix warnings for optional parameters under PHP 8.0#280

Merged
infrastation merged 1 commit intoRackTables:masterfrom
dinoex:master
Jun 13, 2022
Merged

fix warnings for optional parameters under PHP 8.0#280
infrastation merged 1 commit intoRackTables:masterfrom
dinoex:master

Conversation

@dinoex
Copy link
Contributor

@dinoex dinoex commented Jun 13, 2022

Running racktables under PHP 8.0 seems fine.

I collected some warnings:

# sort -u /logs/php-error.log
PHP Deprecated:  Required parameter $before follows optional parameter $instance in /usr/local/www/racktables/wwwroot/inc/database.php on line 5568
PHP Deprecated:  Required parameter $before follows optional parameter $instance in /usr/local/www/racktables/wwwroot/inc/database.php on line 5641
PHP Deprecated:  Required parameter $changes follows optional parameter $instance in /usr/local/www/racktables/wwwroot/inc/database.php on line 5641
PHP Deprecated:  Required parameter $contents follows optional parameter $file_id in /usr/local/www/racktables/wwwroot/inc/database.php on line 4856
PHP Deprecated:  Required parameter $object_id follows optional parameter $instance in /usr/local/www/racktables/wwwroot/inc/database.php on line 5568
PHP Deprecated:  Required parameter $object_id follows optional parameter $instance in /usr/local/www/racktables/wwwroot/inc/database.php on line 5641
PHP Deprecated:  Required parameter $port follows optional parameter $instance in /usr/local/www/racktables/wwwroot/inc/database.php on line 5568
PHP Deprecated:  Required parameter $port_name follows optional parameter $instance in /usr/local/www/racktables/wwwroot/inc/database.php on line 5568

The optional for seems not in use, Plugins not tested.

grep -r of the function names finds only complete function calls.

The included patch fixes the issue for me.

PHP Deprecated:  Required parameter $X follows follows optional parameter
@infrastation infrastation merged commit 3530ddc into RackTables:master Jun 13, 2022
@infrastation
Copy link
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants