From 54f54714bb2e3d2327cf2a2751df20faaedb8c4c Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Tue, 9 Apr 2019 21:04:55 +0200 Subject: [PATCH] Ops: use correct function to get elements Treating a DOMNodeList as an array seems to have worked in PHP5 but it is not with PHP7. --- html/ops/fix_project_prefs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/ops/fix_project_prefs.php b/html/ops/fix_project_prefs.php index 84756b0c68..1732225eb5 100755 --- a/html/ops/fix_project_prefs.php +++ b/html/ops/fix_project_prefs.php @@ -59,7 +59,7 @@ function handle_project_specific_block($node) { $asnode = $node->getElementsByTagName("apps_selected"); $length = $asnode->length; if ($length == 1) { - $node = $asnode[0]; + $node = $asnode->item(0); } else if ($length == 0) { if (ADD_APPS_SELECTED_BLOCK) { // create a new apps_selected block and move app_id tags in there @@ -143,7 +143,7 @@ function repair_prefs($prefs) { // check if venue has a project_specific subnode (its optional) $psnode = $subNode->getElementsByTagName("project_specific"); if ($psnode->length == 1) { - handle_project_specific_block($psnode[0]); + handle_project_specific_block($psnode->item(0)); } } if ($subNode->nodeName == "project_specific") {