checking if a variable is an array before doing array_reverse.
This commit is contained in:
@@ -1027,6 +1027,10 @@ function fbpost_fetchwall($a, $uid) {
|
||||
|
||||
$feed = fetch_url($url);
|
||||
$data = json_decode($feed);
|
||||
|
||||
if (!is_array($data->data))
|
||||
return;
|
||||
|
||||
$items = array_reverse($data->data);
|
||||
|
||||
foreach ($items as $item) {
|
||||
|
||||
Reference in New Issue
Block a user