From: Michael Date: Wed, 30 Dec 2020 07:13:47 +0000 (+0000) Subject: Improved logging, avoid fatal error X-Git-Tag: 2021.01~14^2~1 X-Git-Url: https://reisub.nsupdate.info/git/?a=commitdiff_plain;h=c5c9fda93cc7dd49fea056df212683c1d85b0b1a;p=friendica.git%2F.git Improved logging, avoid fatal error --- diff --git a/mod/events.php b/mod/events.php index d4a902c725..bf813f6837 100644 --- a/mod/events.php +++ b/mod/events.php @@ -30,6 +30,7 @@ use Friendica\Core\Theme; use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; +use Friendica\Model\Contact; use Friendica\Model\Event; use Friendica\Model\Item; use Friendica\Model\User; @@ -129,7 +130,7 @@ function events_post(App $a) ]; $action = ($event_id == '') ? 'new' : 'event/' . $event_id; - $onerror_path = 'events/' . $action . '?' . http_build_query($params, null, null, PHP_QUERY_RFC3986); + $onerror_path = 'events/' . $action . '?' . http_build_query($params, '', '&', PHP_QUERY_RFC3986); if (strcmp($finish, $start) < 0 && !$nofinish) { notice(DI::l10n()->t('Event can not end before it has started.')); diff --git a/src/Model/Event.php b/src/Model/Event.php index 2b4932b4f7..995941edd0 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -292,7 +292,7 @@ class Event $contact = DBA::selectFirst('contact', [], $conditions); if (!DBA::isResult($contact)) { - Logger::warning('Contact not found', ['condition' => $conditions]); + Logger::warning('Contact not found', ['condition' => $conditions, 'cakkstack' => System::callstack(20)]); } // Existing event being modified.