Merge pull request #10612 from MrPetovan/bug/fatal-errors
Various Fatal error fixes
This commit is contained in:
commit
4d25825482
|
@ -65,6 +65,9 @@ function photos_init(App $a) {
|
|||
|
||||
if (DI::args()->getArgc() > 1) {
|
||||
$owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]);
|
||||
if (!$owner) {
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
|
||||
}
|
||||
|
||||
$is_owner = (local_user() && (local_user() == $owner['uid']));
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Network\Probe;
|
||||
|
||||
/**
|
||||
|
@ -44,6 +45,9 @@ class RemoteFollow extends BaseModule
|
|||
public static function init(array $parameters = [])
|
||||
{
|
||||
self::$owner = User::getOwnerDataByNick($parameters['profile']);
|
||||
if (!self::$owner) {
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
|
||||
}
|
||||
|
||||
DI::page()['aside'] = Widget\VCard::getHTML(self::$owner);
|
||||
}
|
||||
|
|
|
@ -2167,7 +2167,7 @@ class Probe
|
|||
{
|
||||
// Search for the newest entry in the feed
|
||||
$curlResult = DI::httpRequest()->get($data['poll']);
|
||||
if (!$curlResult->isSuccess()) {
|
||||
if (!$curlResult->isSuccess() || !$curlResult->getBody()) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user