Browse Source

check for errors from xray

pull/82/head
Aaron Parecki 8 years ago
parent
commit
dd2312ddc8
No known key found for this signature in database GPG Key ID: 276C2817346D6056
  1. 2
      controllers/controllers.php

2
controllers/controllers.php

@ -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