summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuso Lapinlampi <wub@partyvan.eu>2015-10-04 18:55:46 +0200
committerJuuso Lapinlampi <wub@partyvan.eu>2015-10-04 18:55:46 +0200
commit17dd0a062cc8d2b8075f3f5e18da7246e8c8885a (patch)
tree3665225a747468d3d3d4196ed7d90db5cdc26fb5
parentdaac77a1962d8f256b3e7c5a0b46c10c833f688a (diff)
Fix empty Gyazo response with more fallthroughs
Gyazo didn't fallthrough correctly to text, because the type would be set to Gyazo while the Gyazo case didn't exist. PHP is so ambiguous sometimes. This adds the missing fallthroughs that were removed in commit e39a920. It should now correctly fallthrough ("fallback") to text response.
-rwxr-xr-xstatic/classes/Response.class.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php
index 02b92db..7c8bd22 100755
--- a/static/classes/Response.class.php
+++ b/static/classes/Response.class.php
@@ -70,6 +70,9 @@ class Response
case 'json':
$response = $this->json_error($code, $desc);
break;
+ case 'gyazo':
+ // Deprecated API since version 2.0.0
+ // fallthrough
case 'text':
$response = $this->text_error($code, $desc);
break;
@@ -93,6 +96,9 @@ class Response
case 'json':
$response = $this->json_success($files);
break;
+ case 'gyazo':
+ // Deprecated API since version 2.0.0
+ // fallthrough
case 'text':
$response = $this->text_success($files);
break;