craftcms / element-api

Create a JSON API/Feed for your elements in Craft.
MIT License
498 stars 56 forks source link

When using select the api breaks because of output being transmitted to early #125

Closed lenvanessen closed 2 years ago

lenvanessen commented 4 years ago

PHP Warning 'yii\base\ErrorException' with message 'Header may not contain more than a single header, new line detected'

in /Users/lenvanessen/Sites/early-games/vendor/yiisoft/yii2/web/Response.php:380

Stack trace:
#0 /Users/lenvanessen/Sites/early-games/vendor/craftcms/cms/src/web/ErrorHandler.php(74): yii\base\ErrorHandler->handleError(2, 'Header may not ...', '/Users/lenvanes...', 380)
#1 [internal function]: craft\web\ErrorHandler->handleError(2, 'Header may not ...', '/Users/lenvanes...', 380, Array)
#2 /Users/lenvanessen/Sites/early-games/vendor/yiisoft/yii2/web/Response.php(380): header('HTTP/1.1 404 SQ...')
#3 /Users/lenvanessen/Sites/early-games/vendor/yiisoft/yii2/web/Response.php(339): yii\web\Response->sendHeaders()
#4 /Users/lenvanessen/Sites/early-games/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Response->send()
#5 /Users/lenvanessen/Sites/early-games/web/index.php(26): yii\base\Application->run()
#6 /Users/lenvanessen/.composer/vendor/laravel/valet/server.php(158): require('/Users/lenvanes...')
#7 {main}
brandonkelly commented 2 years ago

This looks like a duplicate of #115, but I’m not sure how to reproduce it.

brandonkelly commented 2 years ago

In the case of #138, this ended up being an issue with PHP 7.3.