Announcement: remove datetime comparaison with string to avoid error in MYSQL since version 8.0.16 https://bugs.mysql.com/bug.php?id=95466 - refs BT#21860

pull/5783/head
NicoDucou 1 year ago
parent 9da090da87
commit d4b511d2e9
  1. 2
      main/inc/lib/system_announcements.lib.php

@ -764,7 +764,7 @@ class SystemAnnouncementManager
$sql .= " AND email <>'' AND active = 1 ";
// Expiration date
$sql .= " AND (expiration_date = '' OR expiration_date IS NULL OR expiration_date > '$now') ";
$sql .= " AND (expiration_date IS NULL OR expiration_date > '$now') ";
if ((empty($teacher) || $teacher == '0') && (empty($student) || $student == '0')) {
return true;

Loading…
Cancel
Save