diff options
author | nashe <thomas@chauchefoin.fr> | 2017-07-12 16:36:32 +0100 |
---|---|---|
committer | nashe <thomas@chauchefoin.fr> | 2017-07-12 16:36:32 +0100 |
commit | cccf95cacd91820a5b3e8d3aa95009e4d09fceb3 (patch) | |
tree | 8018d71bf947ecfeb69ae28e6843009aab985439 | |
parent | 3e1f947693ec5ede5f58fc0dd9e9ed086cbcc7d6 (diff) | |
download | planet-cccf95cacd91820a5b3e8d3aa95009e4d09fceb3.tar planet-cccf95cacd91820a5b3e8d3aa95009e4d09fceb3.tar.gz planet-cccf95cacd91820a5b3e8d3aa95009e4d09fceb3.tar.bz2 planet-cccf95cacd91820a5b3e8d3aa95009e4d09fceb3.tar.xz planet-cccf95cacd91820a5b3e8d3aa95009e4d09fceb3.zip |
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"
-rw-r--r-- | app/classes/PlanetFeed.php | 9 |
1 files changed, 8 insertions, 1 deletions
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); } |