api - foreach warnings
This commit is contained in:
parent
1d4fde71e0
commit
414d86d3a9
@ -1518,6 +1518,9 @@ require_once('include/items.php');
|
|||||||
$a = get_app();
|
$a = get_app();
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
|
||||||
|
if(! $r)
|
||||||
|
return $ret;
|
||||||
|
|
||||||
foreach($r as $item) {
|
foreach($r as $item) {
|
||||||
localize_item($item);
|
localize_item($item);
|
||||||
|
|
||||||
@ -1895,6 +1898,7 @@ require_once('include/items.php');
|
|||||||
);
|
);
|
||||||
|
|
||||||
$ret = Array();
|
$ret = Array();
|
||||||
|
if($r) {
|
||||||
foreach($r as $item) {
|
foreach($r as $item) {
|
||||||
if ($box == "inbox" || $item['from-url'] != $profile_url){
|
if ($box == "inbox" || $item['from-url'] != $profile_url){
|
||||||
$recipient = $user_info;
|
$recipient = $user_info;
|
||||||
@ -1907,6 +1911,7 @@ require_once('include/items.php');
|
|||||||
|
|
||||||
$ret[]=api_format_messages($item, $recipient, $sender);
|
$ret[]=api_format_messages($item, $recipient, $sender);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$data = array('$messages' => $ret);
|
$data = array('$messages' => $ret);
|
||||||
|
Reference in New Issue
Block a user