summaryrefslogtreecommitdiffstats
path: root/app/classes
diff options
context:
space:
mode:
authornashe <thomas@chauchefoin.fr>2017-07-12 16:36:32 +0100
committernashe <thomas@chauchefoin.fr>2017-07-12 16:36:32 +0100
commitcccf95cacd91820a5b3e8d3aa95009e4d09fceb3 (patch)
tree8018d71bf947ecfeb69ae28e6843009aab985439 /app/classes
parent3e1f947693ec5ede5f58fc0dd9e9ed086cbcc7d6 (diff)
downloadplanet-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"
Diffstat (limited to 'app/classes')
-rw-r--r--app/classes/PlanetFeed.php9
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);
}