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

[BUGFIX] Prevent error when overlay is not available #4244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magicsunday
Copy link

This fixes:

Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/vendor/apache-solr-for-typo3/solr/Classes/ContentObject/Relation.php line 311

What this pr does

Please add a description here

How to test

Please add a testing instruction here

Fixes: #issue (Please create an related issue first and mark it as fixed here with your pr)

@dkd-kaehm dkd-kaehm force-pushed the patch-1 branch 2 times, most recently from d9f3b15 to f2cafde Compare December 11, 2024 09:33
@dkd-kaehm
Copy link
Collaborator

@magicsunday
Thanks for fixing that issue please check following error
by https://github.com/TYPO3-Solr/ext-solr/actions/runs/12273510045/job/34244520075#step:10:78:

 ------ ----------------------------------------------------------------------------- 
  Line   Classes/ContentObject/Relation.php                                           
 ------ ----------------------------------------------------------------------------- 
  306    Method                                                                       
         ApacheSolrForTypo3\Solr\ContentObject\Relation::getFrontendOverlayService()  
         invoked with 1 parameter, 0 required.                                        
  313    Variable $overlayRelatedRecord might not be defined.                         
 ------ ----------------------------------------------------------------------------- 

@dkd-kaehm
Copy link
Collaborator

Currently fixed the PHPstan issue, but do not merge it.
Relation MUST NOT always fallback to default language, but accept null as well.
Also it must follow the TYPO3s language modies(fallback, strict, free).

@magicsunday
Copy link
Author

I think this can be closed, The relevant issue is #4245, with the fix for v12 release, which should than included in the main branch either.

@dkd-kaehm
Copy link
Collaborator

I think this can be closed, The relevant issue is #4245, with the fix for v12 release, which should than included in the main branch either.

Nope, please do not close.
release-12.0.x and main branches live their own lives, each change on them must be ported via separate Pull-Requests.

This fixes:

Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /var/www/vendor/apache-solr-for-typo3/solr/Classes/ContentObject/Relation.php line 311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants