]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/PushSubscriber.php
Changed to null-coalscing style (??) as sugguested by @MrPetovan
[friendica.git] / src / Model / PushSubscriber.php
index 8593478dea27812ec814a0f44397c08e9a8e471c..51d48d9b23a8f78354e2bf11896e18ccb7037bac 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -54,7 +54,7 @@ class PushSubscriber
        {
                // We'll push to each subscriber that has push > 0,
                // i.e. there has been an update (set in notifier.php).
-               $subscribers = DBA::select('push_subscriber', ['id', 'push', 'callback_url', 'nickname'], ["`push` > 0 AND `next_try` < UTC_TIMESTAMP()"]);
+               $subscribers = DBA::select('push_subscriber', ['id', 'push', 'callback_url', 'nickname'], ["`push` > 0 AND `next_try` < ?", DateTimeFormat::utcNow()]);
 
                while ($subscriber = DBA::fetch($subscribers)) {
                        // We always handle retries with low priority