Skip to content

Commit f59d6b8

Browse files
authored
Merge pull request #2760 from samsonasik/404-html-message-production
Don't show message 404 error, eg: Controller or its method not found in "production" environment and ! is_cli()
2 parents 8729867 + f85d8fd commit f59d6b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ protected function display404errors(PageNotFoundException $e)
976976
}
977977
}
978978

979-
throw PageNotFoundException::forPageNotFound($e->getMessage());
979+
throw PageNotFoundException::forPageNotFound(ENVIRONMENT !== 'production' || is_cli() ? $e->getMessage() : '');
980980
}
981981

982982
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)