Browse Source

check for errors from xray

pull/82/head
Aaron Parecki 7 years ago
parent
commit
dd2312ddc8
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      controllers/controllers.php

+ 1
- 1
controllers/controllers.php View File

@ -437,7 +437,7 @@ $app->get('/reply/preview', function() use($app) {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch); $response = curl_exec($ch);
$data = @json_decode($response, true); $data = @json_decode($response, true);
if($data && $data['data']['type'] == 'entry') {
if($data && isset($data['data']) && $data['data']['type'] == 'entry') {
$entry = $data['data']; $entry = $data['data'];
// Create a nickname based on the author URL // Create a nickname based on the author URL
if(array_key_exists('author', $entry) && $entry['author']['url']) { if(array_key_exists('author', $entry) && $entry['author']['url']) {

Loading…
Cancel
Save