mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge branch 'develop' into testing2/helpers
This commit is contained in:
commit
5101b362d6
@ -37,6 +37,7 @@
|
||||
*/
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\Request;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Config\Services;
|
||||
use Config\Cache;
|
||||
use CodeIgniter\HTTP\URI;
|
||||
@ -202,7 +203,17 @@ class CodeIgniter
|
||||
// Check for a cached page. Execution will stop
|
||||
// if the page has been cached.
|
||||
$cacheConfig = new Cache();
|
||||
$this->displayCache($cacheConfig);
|
||||
$response = $this->displayCache($cacheConfig);
|
||||
if ($response instanceof ResponseInterface)
|
||||
{
|
||||
if ($returnResponse)
|
||||
{
|
||||
return $response;
|
||||
}
|
||||
|
||||
$this->response->send();
|
||||
$this->callExit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@ -232,6 +243,7 @@ class CodeIgniter
|
||||
* @param $cacheConfig
|
||||
* @param bool $returnResponse
|
||||
*
|
||||
* @return \CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\Response|\CodeIgniter\HTTP\ResponseInterface|mixed
|
||||
* @throws \CodeIgniter\Filters\Exceptions\FilterException
|
||||
*/
|
||||
protected function handleRequest(RouteCollectionInterface $routes = null, $cacheConfig, bool $returnResponse = false)
|
||||
@ -495,8 +507,9 @@ class CodeIgniter
|
||||
}
|
||||
|
||||
$output = $this->displayPerformanceMetrics($output);
|
||||
$this->response->setBody($output)->send();
|
||||
$this->callExit(EXIT_SUCCESS);
|
||||
$this->response->setBody($output);
|
||||
|
||||
return $this->response;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ class RedisHandlerTest extends \CIUnitTestCase
|
||||
|
||||
public function testDestruct()
|
||||
{
|
||||
$this->redisHandler = new RedisHandler($this->config->redis);
|
||||
$this->redisHandler = new RedisHandler($this->config);
|
||||
$this->redisHandler->initialize();
|
||||
|
||||
$this->assertInstanceOf(RedisHandler::class, $this->redisHandler);
|
||||
|
Loading…
x
Reference in New Issue
Block a user