Skip to content

Commit 437d5a3

Browse files
committed
readme.MD
1 parent 4e07407 commit 437d5a3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Services/ErrorHandler/ErrorHandler.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,19 @@ private function send(Exception $exception) : void
120120
$notifier = $this->getNotifier();
121121
$importancy = $this->options['importancy'];
122122

123-
$emails = container()->getParameter('mailer_recipients');
124-
if (!$emails) {
125-
throw new RuntimeException('Email of recipitients not setting.');
126-
}
127-
128123
$email = $emails[0];
129124

130125
if ($this->options['recipient']) {
131126
$email = (string)$this->options['recipient'];
132127
}
133128

129+
if (!$email) {
130+
$emails = container()->getParameter('mailer_recipients');
131+
if (!$emails) {
132+
throw new RuntimeException('Email of recipitients not setting.');
133+
}
134+
}
135+
134136
$request = Application::getInstance()->getContext()->getRequest();
135137
$uriString = $request->getRequestUri();
136138

@@ -243,4 +245,4 @@ private function setUp(): void
243245
);
244246
}
245247
}
246-
}
248+
}

readme.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ monolog:
156156

157157
### Отправка сообщений о фатальных ошибках на проекте согласно channel-policy нотификатора
158158

159+
Symfony Notifier должен быть сконфигурирован в `framework.yaml`.
160+
159161
`/bitrix/.settings.php`:
160162

161163
Работает при условии установки [бандла](https://github.com/ProklUng/core.framework.extension.bundle).

0 commit comments

Comments
 (0)