Images::getInfoFromURL[Cached]() will both return empty arrays on error and that needs to be reflected here, too.
parent
4e825fe621
commit
b1b26062fc
|
@ -1050,7 +1050,7 @@ function statusnet_createpost(App $a, $uid, $post, $self, $create_user, $only_ex
|
||||||
$own_url = DI::pConfig()->get($uid, 'statusnet', 'own_url');
|
$own_url = DI::pConfig()->get($uid, 'statusnet', 'own_url');
|
||||||
|
|
||||||
if ($content->user->id == $own_url) {
|
if ($content->user->id == $own_url) {
|
||||||
$self = DBA::selectFirst([], ['self' => true, 'uid' => $uid]);
|
$self = DBA::selectFirst('', ['self' => true, 'uid' => $uid]);
|
||||||
if (DBA::isResult($self)) {
|
if (DBA::isResult($self)) {
|
||||||
$contactid = $self["id"];
|
$contactid = $self["id"];
|
||||||
|
|
||||||
|
|
|
@ -1279,7 +1279,7 @@ function twitter_fix_avatar($avatar)
|
||||||
$new_avatar = str_replace("_normal.", "_400x400.", $avatar);
|
$new_avatar = str_replace("_normal.", "_400x400.", $avatar);
|
||||||
|
|
||||||
$info = Images::getInfoFromURLCached($new_avatar);
|
$info = Images::getInfoFromURLCached($new_avatar);
|
||||||
if (!$info) {
|
if (empty($info)) {
|
||||||
$new_avatar = $avatar;
|
$new_avatar = $avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue