From 1cf91d150ca46ca8d51a4e8836a9b74678690978 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 5 Jun 2016 16:41:02 +0200 Subject: [PATCH] fix SQL error from clearing cache during install Invalid SQL: DELETE FROM egw_notificationpopup WHERE notify_type='push' AND notify_created < --- notifications/inc/class.notifications_push.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/notifications/inc/class.notifications_push.inc.php b/notifications/inc/class.notifications_push.inc.php index 283bdb70c8..75ba1f38f0 100644 --- a/notifications/inc/class.notifications_push.inc.php +++ b/notifications/inc/class.notifications_push.inc.php @@ -110,10 +110,13 @@ class notifications_push implements Json\PushBackend */ protected static function cleanup_push_msgs() { - self::$db->delete(self::TABLE, array( - 'notify_type' => self::TYPE, - 'notify_created < '.self::$db->from_unixtime(Api\Session::heartbeat_limit()), - ), __LINE__, __FILE__, self::APP); + if (($ts = self::$db->from_unixtime(Api\Session::heartbeat_limit()))) + { + self::$db->delete(self::TABLE, array( + 'notify_type' => self::TYPE, + 'notify_created < '.$ts, + ), __LINE__, __FILE__, self::APP); + } } /**