diff options
author | Aaron Parecki <aaron@parecki.com> | 2017-01-06 09:09:41 -0800 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2017-01-06 09:09:41 -0800 |
commit | dd2312ddc8654cc35bd9480c06af3cc7d585fdce (patch) | |
tree | bb1652b5a3df00e438e5164e4d681fc335673272 /controllers | |
parent | 3b122119f7f6b7e98a76afb357efdec8b2b3598a (diff) |
check for errors from xray
Diffstat (limited to 'controllers')
-rw-r--r-- | controllers/controllers.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/controllers/controllers.php b/controllers/controllers.php index 1c3db83..4f150ce 100644 --- a/controllers/controllers.php +++ b/controllers/controllers.php @@ -437,7 +437,7 @@ $app->get('/reply/preview', function() use($app) { curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $data = @json_decode($response, true); - if($data && $data['data']['type'] == 'entry') { + if($data && isset($data['data']) && $data['data']['type'] == 'entry') { $entry = $data['data']; // Create a nickname based on the author URL if(array_key_exists('author', $entry) && $entry['author']['url']) { |