1
1
Fork 0

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:
Roland Häder 2016-03-04 22:46:30 +01:00
parent d88606321d
commit 5a439a31f3
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78

View file

@ -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` != ''",
intval($uid)
);
if(count($r)) {
if(is_filled_array($r)) {
foreach($r as $rr){
$url = normalise_link($rr['url']);
$ret[$url] = $rr;