Merge pull request #10912 from MrPetovan/bug/fatal-errors

Graveyard shift bug fixing
This commit is contained in:
Philipp 2021-10-22 07:12:16 +02:00 committed by GitHub
commit fea62e983b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -1088,7 +1088,7 @@ class Contact
if (!empty($contact['pending'])) {
try {
$intro = DI::intro()->selectForContact($contact['id']);
$menu['follow'] = [DI::l10n()->t('Approve'), 'notifications/intros/' . $intro['id'], true];
$menu['follow'] = [DI::l10n()->t('Approve'), 'notifications/intros/' . $intro->id, true];
} catch (IntroductionNotFoundException $exception) {
DI::logger()->error('Pending contact doesn\'t have an introduction.', ['exception' => $exception]);
}

View File

@ -5,8 +5,8 @@ namespace Friendica\Module;
use Friendica\Core\Hook;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Model\Group;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Network\HTTPException;
@ -32,6 +32,10 @@ class PermissionTooltip extends \Friendica\BaseModule
} else {
$fields = ['uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
$model = DBA::selectFirst($type, $fields, $condition);
$model['allow_cid'] = DI::aclFormatter()->expand($model['allow_cid']);
$model['allow_gid'] = DI::aclFormatter()->expand($model['allow_gid']);
$model['deny_cid'] = DI::aclFormatter()->expand($model['deny_cid']);
$model['deny_gid'] = DI::aclFormatter()->expand($model['deny_gid']);
}
if (!DBA::isResult($model)) {

View File

@ -38,7 +38,7 @@ final class ACLFormatter
public function expand(string $acl_string = null)
{
// In case there is no ID list, return empty array (=> no ACL set)
if (!isset($acl_string)) {
if (empty($acl_string)) {
return [];
}