Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Eshop and required "intl" extension

This issue was reported on the Hunrgarian Support Site and I bring it for you.

The following line in the eshop (Geomap) can stop the execution:
$fmt = new \NumberFormatter(\Locale::ACTUAL_LOCALE, \NumberFormatter::CURRENCY);

I think, it can happen because NumberFormatter and Locale require the "intl" extension to be installed.
PHP Version: 5.3.28, but the documentation says this:


This extension may be installed using the bundled version as of PHP 5.3.0, or as a PECL extension as of PHP 5.2.0. In other words, there are two methods to install the intl extension.
--enable-intl will enable the bundled version while compiling PHP.

Is this requirement acceptable? You can say it, but then the installer should detect it and disable the eshop module with a warning.

I have not tested it yet but can confirm the issue because I have compiled more PHP version with intl many times and heard about servers that do not support intl.
That function is used to pair country to the currency to yield the $USD, Japanese Yen, AUD, Korean Won, Sterling Pound , etc symbol sign.

Affected file is the eshop_settings file.php which uses that option list. I'll find alternative.
Unfortunately It will not help.

1. PHP 5.3 contains the bundled version of intl as PHP 5.4 and newer versions. You still need to compile the PHP with "--enable-intl"
2. phpversion() is a function to show the version and not to check it. version_compare() is the function which intended to check.
3. The best way to write a condition is using extension_loaded() or class_exists()

if (extension_loaded('intl')) {
} else {

if (class_exists('NumberFormatter')) {
} else {

Lets go with the class exists. https://github.com/php-fusion/PHP-Fusion/commit/45abf6e3aee88bd0949a2bcf36e38a17db7cb889
Thread Information
5 posts
535 times
Last Post
Last updated on 5 years ago
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.