From ac2e5a72e62e88d4a151940c67c2f8be5b3638be Mon Sep 17 00:00:00 2001
From: lucashedding <lucashedding@1463982.no-reply.drupal.org>
Date: Mon, 5 Aug 2019 15:56:59 -0600
Subject: [PATCH] Issue #3045273 by tatarbj, heddn, mlhess, catch: Add real
 endpoint after drupal.org provides a live feed

---
 config/install/automatic_updates.settings.yml | 5 +----
 src/Services/AutomaticUpdatesPsa.php          | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/config/install/automatic_updates.settings.yml b/config/install/automatic_updates.settings.yml
index e7c695ec29..87210fd7ff 100644
--- a/config/install/automatic_updates.settings.yml
+++ b/config/install/automatic_updates.settings.yml
@@ -1,7 +1,4 @@
-# Public service announcement URI endpoint.
-# TODO:  Update to correct end point once it is available. See
-# https://www.drupal.org/project/automatic_updates/issues/3045273
-psa_endpoint: 'http://example.com/automatic_updates/test-json'
+psa_endpoint: 'https://updates.drupal.org/psa.json'
 enable_psa: true
 notify: true
 check_frequency: 43200
diff --git a/src/Services/AutomaticUpdatesPsa.php b/src/Services/AutomaticUpdatesPsa.php
index e0e0d12f8b..e082085251 100644
--- a/src/Services/AutomaticUpdatesPsa.php
+++ b/src/Services/AutomaticUpdatesPsa.php
@@ -136,7 +136,7 @@ class AutomaticUpdatesPsa implements AutomaticUpdatesPsaInterface {
 
     try {
       $json_payload = json_decode($response);
-      if ($json_payload) {
+      if (!is_null($json_payload)) {
         foreach ($json_payload as $json) {
           if ($json->is_psa && ($json->type === 'core' || $this->isValidExtension($json->type, $json->project))) {
             $messages[] = $this->message($json->title, $json->link);
-- 
GitLab