Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #20147: Fix error handler compatibility with PHP 8.3 #20228

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Loading