-
Notifications
You must be signed in to change notification settings - Fork 55
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
PHP warnings about undefined array keys (PHP 8.0) #245
Comments
Note: To trigger this bug, a condition It is still broken in The warning is triggered when this expression language condition is evaluated while /**
* @return bool
*/
public function isPost(): bool
{
$page = $GLOBALS['TSFE']->page ?? [];
return $page['doktype'] == Constants::DOKTYPE_BLOG_POST;
}
/**
* @return bool
*/
public function isPage(): bool
{
$page = $GLOBALS['TSFE']->page ?? [];
return $page['doktype'] == Constants::DOKTYPE_BLOG_PAGE;
} |
Addition: Use of Note that Each In the following code... $page = $GLOBALS['TSFE']->page ?? [];
return $page['doktype'] == Constants::DOKTYPE_BLOG_PAGE; ... |
This hit me today too and we have a duplicate for this issue: #260 |
@LeoniePhiline Any idea how we can pour your information into a PR that then makes it into a bugfix release? This is still very annoying for me... |
The maintainers seem to have no interest in this issue, so I must assume preparing a PR might be useless. I'd say maintain a fork. |
@LeoniePhiline A fork is not really in question for me. It is a private blog and I have a lot of other projects to maintain as well... :/ |
Bug Report
Prerequisites
Description
I'm seeing multiple PHP warnings about an array supposedly not being defined:
Additionally, these warnings , also about undefined arrays:
No warnings after downgrading PHP to 7.4
Steps to Reproduce
Expected behavior: Extension should work fine and log a warning once in a while
Actual behavior: Extension seems to works fine, but logs multiple warnings.
Versions
11.0.2
Possible relations
Fix PHP8 undefined array key warning in various places
https://forge.typo3.org/issues/94542
The text was updated successfully, but these errors were encountered: