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

Handle case where no translations were found #30951

Merged
merged 1 commit into from Apr 7, 2019

Conversation

greg0ire
Copy link
Contributor

@greg0ire greg0ire commented Apr 7, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Right now, the program emits a warning when trying to use max() on an
empty array.

Right now, the program emits a warning when trying to use max() on an
empty array.
@greg0ire greg0ire force-pushed the fix-warning-in-translation-check-tool branch from 4b75362 to 79b1fb8 Compare April 7, 2019 08:01
@greg0ire
Copy link
Contributor Author

greg0ire commented Apr 7, 2019

Before

src/Symfony/Component/Form/Resources/translations/validators.en.xlf
===================================================================

PHP Warning:  max(): Array must contain at least one element in /home/gregoire/dev/symfony/src/Symfony/Component/Translation/Resources/bin/translation-status.php on line 162


src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf
==========================================================================

PHP Warning:  max(): Array must contain at least one element in /home/gregoire/dev/symfony/src/Symfony/Component/Translation/Resources/bin/translation-status.php on line 162


src/Symfony/Component/Validator/Resources/translations/validators.en.xlf
========================================================================

PHP Warning:  max(): Array must contain at least one element in /home/gregoire/dev/symfony/src/Symfony/Component/Translation/Resources/bin/translation-status.php on line 162

After

src/Symfony/Component/Form/Resources/translations/validators.en.xlf
===================================================================

No translations found

src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf
==========================================================================

No translations found

src/Symfony/Component/Validator/Resources/translations/validators.en.xlf
========================================================================

No translations found


@fabpot
Copy link
Member

fabpot commented Apr 7, 2019

Thank you @greg0ire.

@fabpot fabpot merged commit 79b1fb8 into symfony:3.4 Apr 7, 2019
fabpot added a commit that referenced this pull request Apr 7, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

Handle case where no translations were found

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Right now, the program emits a warning when trying to use max() on an
empty array.

Commits
-------

79b1fb8 Handle case where no translations were found
@greg0ire greg0ire deleted the fix-warning-in-translation-check-tool branch April 7, 2019 09:40
This was referenced Apr 16, 2019
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.

None yet

5 participants