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

Infinite loop in BundleEntryReader after updating php7.2-intl to 7.2.17 which installs libicu64 #31089

Closed
megawilddaddy opened this issue Apr 12, 2019 · 12 comments
Labels

Comments

@megawilddaddy
Copy link

@megawilddaddy megawilddaddy commented Apr 12, 2019

PHP 7.2.17-1+ubuntu18.04.1+deb.sury.org+3
SYMFONY: Symfony 4.2.4

locale_parse('root') now return an empty array as opposed to previos php versions which makes the Symfony\Component\Intl\Data\Bundle\Reader loop through fallback locales as

"en" => "root" => "" => "root" => "" and so on without it becoming null to break the loop

when reading from the regions because in the Symfony\Component\Intl\Locale::getFallback()
we never get inside the if (1 === \count($localeSubTags))

testedLocales

@megawilddaddy megawilddaddy changed the title Error with root locale after updating php7.2-intl to 7.2.17 which installs libicu64 Infinite loop in BundleEntryReader after updating php7.2-intl to 7.2.17 which installs libicu64 Apr 12, 2019
@ro0NL

This comment has been minimized.

Copy link
Contributor

@ro0NL ro0NL commented Apr 12, 2019

confirmed 👍 PR welcome i guess :)

@enricog84

This comment has been minimized.

Copy link

@enricog84 enricog84 commented Apr 12, 2019

I just had the same issue after upgrading to php version 7.1.28 from 7.1.27.
Using latest symfony 3.4.24 fixed the issue. Imo the additional check in Location.php in the pull request #30781 fixed the issue.

@ro0NL

This comment has been minimized.

Copy link
Contributor

@ro0NL ro0NL commented Apr 12, 2019

So this is fixed in 4.2.5, @megawilddaddy can you try upgrading to see if it solves your issue as well?

@megawilddaddy

This comment has been minimized.

Copy link
Author

@megawilddaddy megawilddaddy commented Apr 12, 2019

Yes, upgrading to 4.2.5 fixed the issue.
Thanks guys!

@vkhramtsov

This comment has been minimized.

Copy link
Contributor

@vkhramtsov vkhramtsov commented Apr 23, 2019

@ro0NL Do we have any chance to get this fix for 2.8 version?

@jakzal

This comment has been minimized.

Copy link
Member

@jakzal jakzal commented Apr 23, 2019

@vkhramtsov

This comment has been minimized.

Copy link
Contributor

@vkhramtsov vkhramtsov commented Apr 23, 2019

@jakzal I agree that it is not security fix, but this bug makes symfony completely unusable in some cases

@vkhramtsov

This comment has been minimized.

Copy link
Contributor

@vkhramtsov vkhramtsov commented Apr 23, 2019

@fabpot What do you think?

@vkhramtsov

This comment has been minimized.

Copy link
Contributor

@vkhramtsov vkhramtsov commented Apr 23, 2019

Anyway I've forked and fixed intl

@fabpot

This comment has been minimized.

Copy link
Member

@fabpot fabpot commented Apr 24, 2019

As @jakzal said, 2.8 is not maintained anymore, you should upgrade to 3.4 or downgrade PHP to a working version.

@vkhramtsov

This comment has been minimized.

Copy link
Contributor

@vkhramtsov vkhramtsov commented Apr 24, 2019

@fabpot Thank you for clarification

@alexander-schranz

This comment has been minimized.

Copy link
Contributor

@alexander-schranz alexander-schranz commented Apr 26, 2019

We had the same problem on some projects so we did overwrite the Locale.php class of the symfony/intl. The package is available under https://github.com/sulu/symfony-intl-fix. But I really would recommend to update to 3.4 and only use it as a temporary solution.

emodric added a commit to netgen-layouts/layouts-core that referenced this issue Apr 27, 2019
emodric added a commit to netgen-layouts/content-browser that referenced this issue Apr 27, 2019
emodric added a commit to netgen-layouts/content-browser that referenced this issue May 8, 2019
emodric added a commit to netgen-layouts/layouts-core that referenced this issue May 15, 2019
hvt pushed a commit to hvt/symfony that referenced this issue Jun 14, 2019
@nocive nocive mentioned this issue Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.