diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-04 18:55:46 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-04 18:55:46 +0200 |
| commit | 17dd0a062cc8d2b8075f3f5e18da7246e8c8885a (patch) | |
| tree | 3665225a747468d3d3d4196ed7d90db5cdc26fb5 | |
| parent | daac77a1962d8f256b3e7c5a0b46c10c833f688a (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-x | static/classes/Response.class.php | 6 |
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; |
