Patch-Source: https://github.com/RackTables/racktables/commit/3530ddc00e51d7476162a5d4a1f6eba4ff40fd7f From 3530ddc00e51d7476162a5d4a1f6eba4ff40fd7f Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Mon, 13 Jun 2022 17:20:07 +0200 Subject: [PATCH] fix warnings for optional parameters under PHP 8.0 PHP Deprecated: Required parameter $X follows follows optional parameter --- wwwroot/inc/database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wwwroot/inc/database.php b/wwwroot/inc/database.php index f71c604e4..76c596b6b 100644 --- a/wwwroot/inc/database.php +++ b/wwwroot/inc/database.php @@ -4853,7 +4853,7 @@ function commitAddFile ($name, $type, $contents, $comment) } } -function commitReplaceFile ($file_id = 0, $contents) +function commitReplaceFile ($file_id, $contents) { global $dbxlink; $query = $dbxlink->prepare('UPDATE File SET mtime = NOW(), contents = ?, size = LENGTH(contents), thumbnail = NULL WHERE id = ?'); @@ -5565,7 +5565,7 @@ function makeVlanListWhere ($db_field_name, $vlan_list) return $ret; } -function upd8021QPort ($instance = 'desired', $object_id, $port_name, $port, $before) +function upd8021QPort ($instance, $object_id, $port_name, $port, $before) { global $tablemap_8021q; if (!array_key_exists ($instance, $tablemap_8021q)) @@ -5638,7 +5638,7 @@ function upd8021QPort ($instance = 'desired', $object_id, $port_name, $port, $be return $changed ? 1 : 0; } -function replace8021QPorts ($instance = 'desired', $object_id, $before, $changes) +function replace8021QPorts ($instance, $object_id, $before, $changes) { $done = 0; foreach ($changes as $pn => $port)