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`.');
310
308
}
311
309
310
+
static::$cacheTTL = 0;
311
+
312
312
$this->startBenchmark();
313
313
314
314
$this->getRequestObject();
@@ -321,7 +321,9 @@ public function run(?RouteCollectionInterface $routes = null, bool $returnRespon
321
321
if ($this->requestinstanceof IncomingRequest && strtolower($this->request->getMethod()) === 'cli') {
322
322
$this->response->setStatusCode(405)->setBody('Method Not Allowed');
323
323
324
-
return$this->sendResponse();
324
+
$this->sendResponse();
325
+
326
+
return;
325
327
}
326
328
327
329
Events::trigger('pre_system');
@@ -409,7 +411,7 @@ private function isWeb(): bool
Copy file name to clipboardExpand all lines: user_guide_src/source/changelogs/v4.2.2.rst
+2
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ BREAKING
15
15
- Now ``Services::request()`` returns ``IncomingRequest`` or ``CLIRequest``.
16
16
- The method signature of ``CodeIgniter\Debug\Exceptions::__construct()`` has been changed. The ``IncomingRequest`` typehint on the ``$request`` parameter was removed. Extending classes should likewise remove the parameter so as not to break LSP.
17
17
- The method signature of ``BaseBuilder.php::insert()`` and ``BaseBuilder.php::update()`` have been changed. The ``?array`` typehint on the ``$set`` parameter was removed.
18
+
- A bug that caused pages to be cached before after filters were executed when using page caching has been fixed. Adding response headers or changing the response body in after filters now caches them correctly.
18
19
19
20
Enhancements
20
21
************
@@ -33,6 +34,7 @@ Deprecations
33
34
************
34
35
35
36
- The parameters of ``Services::request()`` are deprecated.
37
+
- The first parameter ``$cacheConfig`` of ``CodeIgniter::gatherOutput()`` is deprecated.
Copy file name to clipboardExpand all lines: user_guide_src/source/installation/upgrade_422.rst
+11
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,17 @@ Mandatory File Changes
19
19
Breaking Changes
20
20
****************
21
21
22
+
Web Page Caching Bug Fix
23
+
========================
24
+
25
+
- :doc:`../general/caching` now caches the Response data after :ref:`after-filters` are executed.
26
+
- For example, if you enable :ref:`secureheaders`, the Response headers are now sent when the page comes from the cache.
27
+
28
+
.. important:: If you have written **code based on this bug** that assumes changes to the Response in "after" filters are not cached then **sensitive information could be cached and compromised**. If this is the case, change your code to disable caching of the page.
29
+
30
+
Others
31
+
======
32
+
22
33
- The method ``Forge::createTable()`` no longer executes a ``CREATE TABLE IF NOT EXISTS``. If table is not found in ``$db->tableExists($table)`` then ``CREATE TABLE`` is executed.
23
34
- The second parameter ``$ifNotExists`` of ``Forge::_createTable()`` is deprecated. It is no longer used and will be removed in a future release.
0 commit comments