Skip to content

Commit d89294e

Browse files
miladrahimiMilad Rahimi
authored and
Milad Rahimi
committed
fix null response
1 parent 0add279 commit d89294e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
"require": {
2121
"php": ">=7.0",
22+
"ext-json": "*",
2223
"zendframework/zend-diactoros": "^1.7"
2324
},
2425
"require-dev": {

src/MiladRahimi/PhpRouter/Services/Publisher.php

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public function __construct()
3636
*/
3737
public function publish($content)
3838
{
39+
$content = empty($content) ? '' : $content;
40+
3941
$output = fopen($this->stream, 'r+');
4042

4143
if ($content instanceof ResponseInterface) {

0 commit comments

Comments
 (0)