From ce23bb3e78be399d5347b7346d28e8748cb36ae8 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 6 Aug 2011 18:09:31 -0400 Subject: [PATCH] Only check the Request#data[format] key if it is set --- http/output_filter.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/http/output_filter.php b/http/output_filter.php index a6a77e6..cc6f201 100644 --- a/http/output_filter.php +++ b/http/output_filter.php @@ -95,10 +95,12 @@ class OutputFilter $type = NULL; // See if the HTTP request contains the desired output format. - if ($request->data['format'] == 'xml') - $type = 'xml'; - else if ($request->data['format'] == 'json') - $type = 'json'; + if (isset($request->data['format'])) { + if ($request->data['format'] == 'xml') + $type = 'xml'; + else if ($request->data['format'] == 'json') + $type = 'json'; + } // If the request didn't specify a type, try and figure it out using // heuristics. -- 2.43.5