From 17dd0a062cc8d2b8075f3f5e18da7246e8c8885a Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Sun, 4 Oct 2015 16:55:46 +0000 Subject: 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. --- static/classes/Response.class.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'static/classes/Response.class.php') 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; -- cgit v1.2.3