https://src.bluestatic.org
/
hoplite.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41d99c2
)
Only check the Request#data[format] key if it is set
author
Robert Sesek <rsesek@bluestatic.org>
Sat, 6 Aug 2011 22:09:31 +0000
(18:09 -0400)
committer
Robert Sesek <rsesek@bluestatic.org>
Sat, 6 Aug 2011 22:09:31 +0000
(18:09 -0400)
http/output_filter.php
patch
|
blob
|
history
diff --git
a/http/output_filter.php
b/http/output_filter.php
index a6a77e66ce57a93c5a0d1191f91edda1d46e04ef..cc6f2015fd6e4d967491d08510079ac0d3ebaf85 100644
(file)
--- 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.