Skip to content
Snippets Groups Projects
Commit ac2e5a72 authored by Lucas Hedding's avatar Lucas Hedding Committed by Lucas Hedding
Browse files

Issue #3045273 by tatarbj, heddn, mlhess, catch: Add real endpoint after...

Issue #3045273 by tatarbj, heddn, mlhess, catch: Add real endpoint after drupal.org provides a live feed
parent 8d75058c
No related branches found
No related tags found
No related merge requests found
# Public service announcement URI endpoint. psa_endpoint: 'https://updates.drupal.org/psa.json'
# 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'
enable_psa: true enable_psa: true
notify: true notify: true
check_frequency: 43200 check_frequency: 43200
......
...@@ -136,7 +136,7 @@ class AutomaticUpdatesPsa implements AutomaticUpdatesPsaInterface { ...@@ -136,7 +136,7 @@ class AutomaticUpdatesPsa implements AutomaticUpdatesPsaInterface {
try { try {
$json_payload = json_decode($response); $json_payload = json_decode($response);
if ($json_payload) { if (!is_null($json_payload)) {
foreach ($json_payload as $json) { foreach ($json_payload as $json) {
if ($json->is_psa && ($json->type === 'core' || $this->isValidExtension($json->type, $json->project))) { if ($json->is_psa && ($json->type === 'core' || $this->isValidExtension($json->type, $json->project))) {
$messages[] = $this->message($json->title, $json->link); $messages[] = $this->message($json->title, $json->link);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment