summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-01-06 09:09:41 -0800
committerAaron Parecki <aaron@parecki.com>2017-01-06 09:09:41 -0800
commitdd2312ddc8654cc35bd9480c06af3cc7d585fdce (patch)
treebb1652b5a3df00e438e5164e4d681fc335673272 /controllers
parent3b122119f7f6b7e98a76afb357efdec8b2b3598a (diff)
check for errors from xray
Diffstat (limited to 'controllers')
-rw-r--r--controllers/controllers.php2
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']) {