diff options
author | Phie <phie@phie.ovh> | 2019-03-26 01:01:17 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2019-03-26 01:01:17 +0300 |
commit | bf4ed375f3ea6e5efd6668e4c1d3a041dcd9be2f (patch) | |
tree | 9253125f8627fb127bdca14a8726a85d59d217fa | |
parent | 9918c776711b519d7c4b3a40218ecf4fce190c12 (diff) |
avoid <=>v0.14.1
-rwxr-xr-x | lib/Controller/NoteController.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index ed4ea0b..dcb8994 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -269,7 +269,11 @@ } if($saveDB){ usort($myDbContent->data, function($a, $b) { - return $a->time <=> $b->time; + if($a->time <= $b->time) + return -1; + if($a->time >= $b->time) + return 1; + return 0; }); $myDb->putContent(json_encode($myDbContent)); } @@ -316,7 +320,11 @@ } if($saveDB){ usort($myDbContent->data, function($a, $b) { - return $a->time <=> $b->time; + if($a->time <= $b->time) + return -1; + if($a->time >= $b->time) + return 1; + return 0; }); $myDb->putContent(json_encode($myDbContent)); } |