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: Address deprecation warnings from PHP 8.1 #2796

Merged
merged 4 commits into from
Mar 30, 2022

Conversation

mficzel
Copy link
Member

@mficzel mficzel commented Mar 29, 2022

The trim method did not like beeing called with a null argument when the FLOW_CONTEXT environment was not set.

PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/ficzel/PhpStormProjects/neos-development-distribution-8-0/Packages/Framework/Neos.Flow/Scripts/flow.php on line 68

The trim method did not like beeing called with a null argument which happened when no FLOW_CONTEXT environment was set.
This is addressed by defaulting to an empty string in this case.
@mficzel mficzel force-pushed the bugfix/addressPhp81Deprecations branch from ca6036d to bbb52fe Compare March 29, 2022 13:46
@mficzel mficzel changed the base branch from 8.0 to 7.0 March 29, 2022 13:46
Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

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

A (string) cast would suffice, too…

@mficzel
Copy link
Member Author

mficzel commented Mar 29, 2022

@kdambekalns adjusted to (string)

@kdambekalns kdambekalns merged commit 41f92c0 into 7.0 Mar 30, 2022
@kdambekalns kdambekalns deleted the bugfix/addressPhp81Deprecations branch March 30, 2022 12:39
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 this pull request may close these issues.

3 participants