PHP8 fix
This commit is contained in:
parent
6d6a01ede5
commit
222bfa1680
@ -3,7 +3,9 @@
|
|||||||
function page_comparator($a,$b){
|
function page_comparator($a,$b){
|
||||||
//This function is the sorting criterion for the later call of usort, which will sort the page objects
|
//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.
|
//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){
|
function gen_nav_element($page){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user