diff --git a/composer.json b/composer.json index ae79cb9..5003da7 100644 --- a/composer.json +++ b/composer.json @@ -3,9 +3,7 @@ "license": "MIT", "description": "Add a CSV response type to Laravel", "require": { - "php": ">=5.5.9", - "illuminate/routing": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0", - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0" + "php": ">=5.5.9" }, "require-dev": { "phpunit/phpunit": "4.8.*", diff --git a/src/Neoxia/Routing/ResponseFactory.php b/src/Neoxia/Routing/ResponseFactory.php index 8be9973..0261c0d 100644 --- a/src/Neoxia/Routing/ResponseFactory.php +++ b/src/Neoxia/Routing/ResponseFactory.php @@ -57,7 +57,7 @@ public function parseOptions(array $customOptions) */ protected function dataIsEmpty($data) { - if (method_exists($data, 'isEmpty')) { + if (is_object($data) && method_exists($data, 'isEmpty')) { return $data->isEmpty(); }