Skip to content

Commit

Permalink
Fix #20147: Fix error handler compatibility with PHP 8.3 (#20228)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark authored Jul 12, 2024
1 parent f96c2c5 commit 4b0a02e
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;

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

$error = error_get_last();
Expand Down

0 comments on commit 4b0a02e

Please sign in to comment.