Skip to content

Commit 4b0a02e

Browse files
authored
Fix #20147: Fix error handler compatibility with PHP 8.3 (#20228)
1 parent f96c2c5 commit 4b0a02e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

framework/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Yii Framework 2 Change Log
99
- Bug #20191: Fix `ActiveRecord::getDirtyAttributes()` for JSON columns with multi-dimensional array values (brandonkelly)
1010
- Bug #20211: Add acceptable parameters to `MaskedInput::init()` method (alxlnk)
1111
- Bug #20226: Revert all PR for "Data providers perform unnecessary COUNT queries that negatively affect performance" (@terabytesoftw)
12+
- Bug #20147: Fix error handler compatibility with PHP 8.3 (samdark)
1213

1314

1415
2.0.50 May 30, 2024

framework/base/ErrorHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ public function handleError($code, $message, $file, $line)
279279
*/
280280
public function handleFatalError()
281281
{
282-
unset($this->_memoryReserve);
282+
$this->_memoryReserve = null;
283283

284-
if (isset($this->_workingDirectory)) {
284+
if (!empty($this->_workingDirectory)) {
285285
// fix working directory for some Web servers e.g. Apache
286286
chdir($this->_workingDirectory);
287287
// flush memory
288-
unset($this->_workingDirectory);
288+
$this->_workingDirectory = null;
289289
}
290290

291291
$error = error_get_last();

0 commit comments

Comments
 (0)