Skip to content

Fix "Notice: Undefined index: headers" in messenger with Oracle #46121

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

Merged
merged 1 commit into from
Apr 20, 2022
Merged

Fix "Notice: Undefined index: headers" in messenger with Oracle #46121

merged 1 commit into from
Apr 20, 2022

Conversation

rjd22
Copy link
Contributor

@rjd22 rjd22 commented Apr 20, 2022

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets #44988
License MIT
Doc PR no

When using messenger with Oracle. The following exception happens:

In Connection.php line 453:
                                    
  [ErrorException]                  
  Notice: Undefined index: headers  
                                    
Exception trace:
  at /var/www/app/vendor/symfony/doctrine-messenger/Transport/Connection.php:453
 Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection->decodeEnvelopeHeaders()

The reason for this exception is because most Oracle databases use all caps table and field names. This is not a problem for updating and saving but when messenger tries to get the messages it will result in a response with all caps field names.

By selecting the was we do SELECT table.foo as "foo" we force the result to be lowercase even when the actual field is all caps.

@carsonbot carsonbot added this to the 4.4 milestone Apr 20, 2022
@rjd22 rjd22 changed the title Fix "Notice: Undefined index: headers" in messenger with Oracle [Messenger] Fix "Notice: Undefined index: headers" in messenger with Oracle Apr 20, 2022
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

@carsonbot carsonbot changed the title [Messenger] Fix "Notice: Undefined index: headers" in messenger with Oracle Fix "Notice: Undefined index: headers" in messenger with Oracle Apr 20, 2022
@nicolas-grekas
Copy link
Member

Thank you @rjd22.

@nicolas-grekas nicolas-grekas merged commit 5116846 into symfony:4.4 Apr 20, 2022
@rjd22 rjd22 deleted the fix-undefined-messenger-get-oracle-platform branch April 20, 2022 13:40
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.

3 participants