Slim Application Error

The application could not run because of the following error:

Details

Type: TypeError
Code: 0
Message: fwrite(): Argument #2 ($data) must be of type string, null given
File: /app/vendor/slim/psr7/src/Stream.php
Line: 333

Trace

#0 /app/vendor/slim/psr7/src/Stream.php(333): fwrite(Resource id #154, NULL)
#1 /app/util/api/ServerFunction.php(21): Slim\Psr7\Stream->write(NULL)
#2 /app/index.php(176): createPdfResponse(Object(Slim\Psr7\Response), 200, NULL)
#3 /app/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Closure->{closure}(Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array)
#4 /app/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array)
#5 /app/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle(Object(Slim\Psr7\Request))
#6 /app/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request))
#7 /app/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request))
#8 /app/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run(Object(Slim\Psr7\Request))
#9 /app/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request))
#10 /app/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner))
#11 /app/vendor/slim/slim/Slim/Middleware/BodyParsingMiddleware.php(64): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request))
#12 /app/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\BodyParsingMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#13 /app/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request))
#14 /app/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#15 /app/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request))
#16 /app/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request))
#17 /app/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Slim\Psr7\Request))
#18 /app/index.php(183): Slim\App->run()
#19 {main}
Go Back