Browse Source

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

Graveyard shift bug fixing
pull/10923/head
Philipp 8 months ago committed by GitHub
parent
commit
fea62e983b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Model/Contact.php
  2. 6
      src/Module/PermissionTooltip.php
  3. 2
      src/Util/ACLFormatter.php

2
src/Model/Contact.php

@ -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]);
}

6
src/Module/PermissionTooltip.php

@ -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)) {

2
src/Util/ACLFormatter.php

@ -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 [];
}

Loading…
Cancel
Save