cast db stmt object to array

pull/1603/head
Art4 2025-03-14 08:21:08 +00:00
parent 38a8e9a169
commit 06b4f164f5
1 changed files with 2 additions and 2 deletions

View File

@ -50,14 +50,14 @@ function notifyall_post()
$recipients = DBA::p("SELECT DISTINCT `email` FROM `user`" . DBA::buildCondition($condition), $condition);
if (! $recipients || !is_iterable($recipients)) {
if (! $recipients) {
DI::sysmsg()->addNotice(DI::l10n()->t('No recipients found.'));
return;
}
$notifyEmail = new NotifyAllEmail(DI::l10n(), DI::config(), DI::baseUrl(), $text);
foreach ($recipients as $recipient) {
foreach (DBA::toArray($recipients) as $recipient) {
DI::emailer()->send($notifyEmail->withRecipient($recipient['email']));
}