Skip to content

Commit

Permalink
fix null response
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi authored and Milad Rahimi committed Mar 6, 2019
1 parent 0add279 commit d89294e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"require": {
"php": ">=7.0",
"ext-json": "*",
"zendframework/zend-diactoros": "^1.7"
},
"require-dev": {
Expand Down
2 changes: 2 additions & 0 deletions src/MiladRahimi/PhpRouter/Services/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function __construct()
*/
public function publish($content)
{
$content = empty($content) ? '' : $content;

$output = fopen($this->stream, 'r+');

if ($content instanceof ResponseInterface) {
Expand Down

0 comments on commit d89294e

Please sign in to comment.