You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewLogicException('Context must be set before run() is called. If you are upgrading from 4.1.x, you need to merge `public/index.php` and `spark` file from `vendor/codeigniter4/framework`.');
296
303
}
@@ -309,7 +316,11 @@ public function run(?RouteCollectionInterface $routes = null, bool $returnRespon
309
316
if ($this->requestinstanceof IncomingRequest && strtolower($this->request->getMethod()) === 'cli') {
310
317
$this->response->setStatusCode(405)->setBody('Method Not Allowed');
311
318
312
-
$this->sendResponse();
319
+
if (! $this->returnResponse) {
320
+
$this->sendResponse();
321
+
} else {
322
+
return$this->response;
323
+
}
313
324
314
325
return;
315
326
}
@@ -345,13 +356,22 @@ public function run(?RouteCollectionInterface $routes = null, bool $returnRespon
0 commit comments