FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
190 stars 229 forks source link

[BUGFIX] PHP 8 warning fix if $record is empty in getResources func #1807

Closed dextar47 closed 1 year ago

dextar47 commented 1 year ago

I upgraded my project's PHP version to PHP 8.1 and got this PHP warning in the backend layout module. The issue was that $record in getResources function was empty (ViewHelpers/Resource/Record/FalViewHelper.php) and then there was no $record[$this->idField] was trying to fetch uid key's value in $record array (without isset() in else part, Line no. 147).

dextar47 commented 1 year ago

@NamelessCoder thanks for approving the PR. But it shows all checks have failed. And it failed with this message "typo3/class-alias-loader contains a Composer plugin which is blocked by your allow-plugins config". I don't think so that it is due to this PR change. Is it intentional or know issue?

NamelessCoder commented 1 year ago

Hi @dextar47 - it's unrelated to your change, the cause is a composer change that requires every composer plugin to be whitelisted before install can happen. I think the problem is already fixed in VHS upstream so if you could either rebase and push your patch branch again, or grant me access to do it for you (settings in PR to allow maintainers of upstream to make changes in your PR branch) then that should allow the build to run.

dextar47 commented 1 year ago

@NamelessCoder its done image