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

[BUG] PHP Warning Trying to access array offset on value of type null in Util.php #3413

Closed
froemken opened this issue Nov 25, 2022 · 2 comments · May be fixed by #3427
Closed

[BUG] PHP Warning Trying to access array offset on value of type null in Util.php #3413

froemken opened this issue Nov 25, 2022 · 2 comments · May be fixed by #3427

Comments

@froemken
Copy link
Contributor

Describe the bug

PHP Warning: Trying to access array offset on value of type null in /var/www/html/public/typo3conf/ext/solr/Classes/Util.php line 119

To Reproduce
Steps to reproduce the behavior:
Delete a record which is not referenced to an existing col_pos. Happen when you switch backend layouts.

Expected behavior
Check value of BackendUtility::getRecord before accessing it as array

Used versions (please complete the following information):

  • TYPO3 Version: 11.5.19
  • Browser: Chrome
  • EXT:solr Version: 11.5.0
  • Used Apache Solr Version: 8.11.1
  • PHP Version: 8.1.11
  • MySQL Version: 10.2.44-MariaDB-1:10.2.44+maria~bionic-log - mariadb.org binary distribution
@dkd-kaehm
Copy link
Collaborator

@froemken
Thanks for reporting that issue.
I can not reproduce this issue currently within solr-ddev-site
ON:

Could you please check if #3427 resolves this issue?

@froemken
Copy link
Contributor Author

Hi @dkd-kaehm

yes, this will solve the issue, too.

The return value of BU::getRecord() is array|null that's why I thought you will add a test for array instead, before accessing the array value one line below.

Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants