From 1bd97997b517ed21e6722bf07904d89b0b3432a2 Mon Sep 17 00:00:00 2001 From: Nonimart Date: Mon, 23 Jun 2025 17:02:21 +0200 Subject: [PATCH] FIX fixing syntax problem on php 7 --- includes/utilities.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/utilities.php b/includes/utilities.php index 71e5903..47fd314 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -119,12 +119,11 @@ function apply_footnotes_urls_to_content($content) @$dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $links = $dom->getElementsByTagName('a'); - phpinfo(); + foreach ($links as $key => $link) { - // write_log($key); + if ($link->hasAttribute('class') && strpos($link->getAttribute('class'), 'footnote-reference') !== false) { - $link->setAttribute('id', 'footnote-' . $key + 1); - write_log($link->getAttribute('id')); + $link->setAttribute('id', 'footnote-' . ($key + 1)); } }