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

Address a couple of fatal errors
pull/12279/head
Philipp 2022-11-27 00:31:14 +01:00 zatwierdzone przez GitHub
commit 801ee5c17f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -568,7 +568,15 @@ class Worker
// Set the workerLogger as new default logger
if ($method_call) {
call_user_func_array(sprintf('Friendica\Worker\%s::execute', $funcname), $argv);
try {
call_user_func_array(sprintf('Friendica\Worker\%s::execute', $funcname), $argv);
} catch (\TypeError $e) {
// No need to defer a worker queue entry if the arguments are invalid
Logger::notice('Wrong worker arguments', ['class' => $funcname, 'argv' => $argv, 'queue' => $queue, 'message' => $e->getMessage()]);
} catch (\Throwable $e) {
Logger::error('Uncaught exception in worker execution', ['class' => get_class($e), 'message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine(), 'trace' => $e->getTraceAsString()]);
Worker::defer();
}
} else {
$funcname($argv, count($argv));
}

Wyświetl plik

@ -6,7 +6,7 @@
<div class="contact-entry-photo mframe" id="contact-entry-photo-{{$contact.id}}">
<div class="contact-photo-image-wrapper hidden-xs">
<a href="{{if $contact.photo_menu.edit}}{{$contact.photo_menu.edit.1}}{{else}}{{$contact.url}}{{/if}}">
<a href="{{if !empty($contact.photo_menu.edit)}}{{$contact.photo_menu.edit.1}}{{else}}{{$contact.url}}{{/if}}">
<img class="contact-photo media-object xl" src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" />
</a>
</div>