From cccf95cacd91820a5b3e8d3aa95009e4d09fceb3 Mon Sep 17 00:00:00 2001 From: nashe Date: Wed, 12 Jul 2017 16:36:32 +0100 Subject: Fix PHP warning "usort() expects parameter 2 to be a valid callback, non-static method PlanetFeed::compare() should not be called statically in moonmoon/custom/views/default/sidebar.tpl.php on line 3" --- app/classes/PlanetFeed.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/classes/PlanetFeed.php b/app/classes/PlanetFeed.php index f63ac5a..3d2ea2f 100644 --- a/app/classes/PlanetFeed.php +++ b/app/classes/PlanetFeed.php @@ -46,7 +46,14 @@ class PlanetFeed extends SimplePie return $this->isDown; } - public function compare($person1, $person2) + /** + * Compare two Person by their name. + * + * @param $person1 + * @param $person2 + * @return int + */ + public static function compare($person1, $person2) { return strcasecmp($person1->name, $person2->name); } -- cgit v1.2.1