Skip to content

Commit

Permalink
Fix #20147: Fix error handler compatibility with PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Jul 12, 2024
1 parent f96c2c5 commit 984cb4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Yii Framework 2 Change Log
- Bug #20191: Fix `ActiveRecord::getDirtyAttributes()` for JSON columns with multi-dimensional array values (brandonkelly)
- Bug #20211: Add acceptable parameters to `MaskedInput::init()` method (alxlnk)
- Bug #20226: Revert all PR for "Data providers perform unnecessary COUNT queries that negatively affect performance" (@terabytesoftw)
- Bug #20147: Fix error handler compatibility with PHP 8.3 (samdark)


2.0.50 May 30, 2024
Expand Down
6 changes: 3 additions & 3 deletions framework/base/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ public function handleError($code, $message, $file, $line)
*/
public function handleFatalError()
{
unset($this->_memoryReserve);
$this->_memoryReserve = null;

Check warning on line 282 in framework/base/ErrorHandler.php

View check run for this annotation

Codecov / codecov/patch

framework/base/ErrorHandler.php#L282

Added line #L282 was not covered by tests

if (isset($this->_workingDirectory)) {
if (!empty($this->_workingDirectory)) {

Check warning on line 284 in framework/base/ErrorHandler.php

View check run for this annotation

Codecov / codecov/patch

framework/base/ErrorHandler.php#L284

Added line #L284 was not covered by tests
// fix working directory for some Web servers e.g. Apache
chdir($this->_workingDirectory);
// flush memory
unset($this->_workingDirectory);
$this->_workingDirectory = null;

Check warning on line 288 in framework/base/ErrorHandler.php

View check run for this annotation

Codecov / codecov/patch

framework/base/ErrorHandler.php#L288

Added line #L288 was not covered by tests
}

$error = error_get_last();
Expand Down

0 comments on commit 984cb4a

Please sign in to comment.