avolutions-php / avolutions

AVOLUTIONS: Just another open source PHP framework
MIT License
4 stars 2 forks source link

Error if Controller action does not return string #142

Closed avolutions closed 3 years ago

avolutions commented 3 years ago

If a Controller Action does not return a string or a stringable (e.g. View) I receive the following error:

Fatal error: Uncaught TypeError: Avolutions\Http\Response::setBody(): Argument #1 ($value) must be of type string, null given, called in \src\Http\Request.php on line 87 and defined in \src\Http\Response.php:40 Stack trace: #0 \src\Http\Request.php(87): Avolutions\Http\Response->setBody(NULL) #1 \public\index.php(35): Avolutions\Http\Request->send() #2 {main} thrown in \src\Http\Response.php on line 40