diff options
| author | Peter Lejeck <peter.lejeck@gmail.com> | 2013-12-01 06:31:43 +0100 |
|---|---|---|
| committer | Peter Lejeck <peter.lejeck@gmail.com> | 2013-12-01 06:31:43 +0100 |
| commit | 62c9541fefeded5af9b1ac17be3ec156eee26f08 (patch) | |
| tree | dd02dc346cb404699b3193efb6f211cc5ab92943 | |
| parent | a0e6730280d4735f840a5279072710c644cb7f79 (diff) | |
Fix output when output isn't set
| -rw-r--r-- | static/upload.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/static/upload.php b/static/upload.php index df8d9ad..852c5ed 100644 --- a/static/upload.php +++ b/static/upload.php @@ -173,7 +173,9 @@ function respond ($code, $files = null) { $files = $code; } - switch ($_GET['output']) { + $format = array_key_exists('output', $_GET) ? $_GET['output'] : 'json'; + + switch ($format) { case 'gyazo': respond_gyazo($code, $files); break; @@ -181,8 +183,8 @@ function respond ($code, $files = null) { respond_csv($code, $files); break; case 'json': - default: respond_json($code, $files); + break; } } |
