Fixes E_WARNING from foreach() because count() seem to return TRUE even when $r is no array ?!
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
d88606321d
commit
5a439a31f3
3
boot.php
3
boot.php
|
@ -1849,7 +1849,8 @@ function load_contact_links($uid) {
|
||||||
$r = q("SELECT `id`,`network`,`url`,`thumb`, `rel` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `thumb` != ''",
|
$r = q("SELECT `id`,`network`,`url`,`thumb`, `rel` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `thumb` != ''",
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
|
||||||
|
if(is_filled_array($r)) {
|
||||||
foreach($r as $rr){
|
foreach($r as $rr){
|
||||||
$url = normalise_link($rr['url']);
|
$url = normalise_link($rr['url']);
|
||||||
$ret[$url] = $rr;
|
$ret[$url] = $rr;
|
||||||
|
|
Loading…
Reference in a new issue