From d45a407185fae6d11353dbe259eb4db27423bb7b Mon Sep 17 00:00:00 2001 From: Andreas Piening Date: Wed, 4 Apr 2018 12:54:18 +1200 Subject: [PATCH] FIX: make RestfulServer:: configurable --- src/RestfulServer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RestfulServer.php b/src/RestfulServer.php index 6036a07..8212daf 100644 --- a/src/RestfulServer.php +++ b/src/RestfulServer.php @@ -331,15 +331,15 @@ class RestfulServer extends Controller // get formatter if (!empty($extension)) { $formatter = DataFormatter::for_extension($extension); - } elseif ($includeAcceptHeader && !empty($accept) && $accept != '*/*') { + } elseif ($includeAcceptHeader && !empty($accept) && strpos($accept, '*/*') === false) { $formatter = DataFormatter::for_mimetypes($mimetypes); if (!$formatter) { - $formatter = DataFormatter::for_extension(self::$default_extension); + $formatter = DataFormatter::for_extension($this->config()->default_extension); } } elseif (!empty($contentType)) { $formatter = DataFormatter::for_mimetype($contentType); } else { - $formatter = DataFormatter::for_extension(self::$default_extension); + $formatter = DataFormatter::for_extension($this->config()->default_extension); } if (!$formatter) {