From 222bfa1680c3106e748b641b1f38fd1b21341d13 Mon Sep 17 00:00:00 2001 From: Jim Shepich III Date: Tue, 30 May 2023 18:12:01 -0400 Subject: [PATCH] PHP8 fix --- info.php | 5 +++++ scripts/nav.php | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 info.php diff --git a/info.php b/info.php new file mode 100644 index 0000000..47b3cb9 --- /dev/null +++ b/info.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/scripts/nav.php b/scripts/nav.php index eb5e1a8..3237512 100644 --- a/scripts/nav.php +++ b/scripts/nav.php @@ -3,7 +3,9 @@ function page_comparator($a,$b){ //This function is the sorting criterion for the later call of usort, which will sort the page objects //from pages.json in increasing order of their "index" value. - return $a->index > $b->index; + return $a->index <=> $b->index; + //For some reason, PHP8 requires the spaceship operator (<=>) + //instead of a greater than symbol. } function gen_nav_element($page){