Skip to content

Commit e91d0e7

Browse files
authored
Set error code for Command failures
1 parent 4807590 commit e91d0e7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

system/CodeIgniter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ protected function handleRequest(RouteCollectionInterface $routes = null, $cache
355355
else
356356
{
357357
$response = $this->response;
358+
359+
// Set response code for CLI command failures
360+
if (is_numeric($returned) || $returned === false)
361+
{
362+
$response->setStatusCode(400);
363+
}
358364
}
359365

360366
if ($response instanceof Response)

0 commit comments

Comments
 (0)