Skip to content

[Inflector] Fix Notice when argument is empty string #39270

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
Dec 1, 2020

Conversation

moldman
Copy link
Contributor

@moldman moldman commented Dec 1, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

Fixing issue when we call Inflector with empty string:

\Symfony\Component\Inflector\Inflector::singularize('');
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice:  Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
...
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice:  Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363

Fix for 5.1 #39244

@derrabus
Copy link
Member

derrabus commented Dec 1, 2020

Good catch, thanks @moldman.

@derrabus derrabus merged commit 782ee5d into symfony:4.4 Dec 1, 2020
This was referenced Dec 18, 2020
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.

4 participants