[Skip to main content](#vessel-content)

#   Attempt to assign property "currency\_locale" on null

##

- **[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")**
- [![diacotm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52238-diacotm "View diacotm's Profile") Topic Author
- [ Offline](/forum/user/52238-diacotm)

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 8 months ago [\#359270](#359270) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  *[Attempt to assign property "currency\_locale" on null](/forum/31-development/907785-attempt-to-assign-property-currency-locale-on-null#359270 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : An error has occurred.  0 Attempt to assign property &quot;currency&#95;locale&quot; on null  Call Stack # Function Location 1 () JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:2935 2 hikashopCurrencyClass-&gt;checkLocale() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:53 3 hikashopCurrencyClass-&gt;get() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:2278 4 hikashopCurrencyClass-&gt;save() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;config.php:117 5 hikashopConfigClass-&gt;save() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;controllers&#92;config.php:87 6 ConfigController-&gt;store() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;controllers&#92;config.php:33 7 ConfigController-&gt;apply() JROOT&#92;libraries&#92;src&#92;MVC&#92;Controller&#92;BaseController.php:730 8 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;helper.php:2554 9 hikashopController-&gt;execute() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;hikashop.php:73 10 require&#95;once() JROOT&#92;libraries&#92;src&#92;Dispatcher&#92;LegacyComponentDispatcher.php:71 11 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher::Joomla&#92;CMS&#92;Dispatcher&#92;{closure}() JROOT&#92;libraries&#92;src&#92;Dispatcher&#92;LegacyComponentDispatcher.php:73 12 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher-&gt;dispatch() JROOT&#92;libraries&#92;src&#92;Component&#92;ComponentHelper.php:361 13 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT&#92;libraries&#92;src&#92;Application&#92;AdministratorApplication.php:150 14 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT&#92;libraries&#92;src&#92;Application&#92;AdministratorApplication.php:195 15 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT&#92;libraries&#92;src&#92;Application&#92;CMSApplication.php:306 16 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;execute() JROOT&#92;administrator&#92;includes&#92;app.php:58 17 require&#95;once() JROOT&#92;administrator&#92;index.php:32  Hi, I got an error while saving the hikashop configuration in the administrator area, the error is &quot; Attempt to assign property &quot;currency&#95;locale&quot; on null &quot;, what should I do to fix this problem? Thanks in advance")* was created by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")*

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.0.2
-- PHP version -- : 8.1.13
-- Browser(s) name and version -- : firefox
-- Error-message(debug-mod must be tuned on) -- : An error has occurred.

0 Attempt to assign property "currency_locale" on null

Call Stack
\# Function Location
1 () JROOT\administrator\components\com_hikashop\classes\currency.php:2935
2 hikashopCurrencyClass-&gt;checkLocale() JROOT\administrator\components\com_hikashop\classes\currency.php:53
3 hikashopCurrencyClass-&gt;get() JROOT\administrator\components\com_hikashop\classes\currency.php:2278
4 hikashopCurrencyClass-&gt;save() JROOT\administrator\components\com_hikashop\classes\config.php:117
5 hikashopConfigClass-&gt;save() JROOT\administrator\components\com_hikashop\controllers\config.php:87
6 ConfigController-&gt;store() JROOT\administrator\components\com_hikashop\controllers\config.php:33
7 ConfigController-&gt;apply() JROOT\libraries\src\MVC\Controller\BaseController.php:730
8 Joomla\CMS\MVC\Controller\BaseController-&gt;execute() JROOT\administrator\components\com_hikashop\helpers\helper.php:2554
9 hikashopController-&gt;execute() JROOT\administrator\components\com_hikashop\hikashop.php:73
10 require_once() JROOT\libraries\src\Dispatcher\LegacyComponentDispatcher.php:71
11 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT\libraries\src\Dispatcher\LegacyComponentDispatcher.php:73
12 Joomla\CMS\Dispatcher\LegacyComponentDispatcher-&gt;dispatch() JROOT\libraries\src\Component\ComponentHelper.php:361
13 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\AdministratorApplication.php:150
14 Joomla\CMS\Application\AdministratorApplication-&gt;dispatch() JROOT\libraries\src\Application\AdministratorApplication.php:195
15 Joomla\CMS\Application\AdministratorApplication-&gt;doExecute() JROOT\libraries\src\Application\CMSApplication.php:306
16 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT\administrator\includes\app.php:58
17 require_once() JROOT\administrator\index.php:32

Hi,
I got an error while saving the hikashop configuration in the administrator area, the error is " Attempt to assign property "currency_locale" on null ",
what should I do to fix this problem?
Thanks in advance

- [ ![hikaerror.png](/forum/attachment/58879) ](/forum/attachment/58879 "hikaerror.png") [ ](/forum/attachment/58879?download=1 "hikaerror.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzc4NS1hdHRlbXB0LXRvLWFzc2lnbi1wcm9wZXJ0eS1jdXJyZW5jeS1sb2NhbGUtb24tbnVsbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

2 years 8 months ago [\#359278](#359278) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Attempt to assign property "currency\_locale" on null](/forum/31-development/907785-attempt-to-assign-property-currency-locale-on-null#359278 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : An error has occurred.  0 Attempt to assign property &quot;currency&#95;locale&quot; on null  Call Stack # Function Location 1 () JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:2935 2 hikashopCurrencyClass-&gt;checkLocale() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:53 3 hikashopCurrencyClass-&gt;get() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:2278 4 hikashopCurrencyClass-&gt;save() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;config.php:117 5 hikashopConfigClass-&gt;save() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;controllers&#92;config.php:87 6 ConfigController-&gt;store() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;controllers&#92;config.php:33 7 ConfigController-&gt;apply() JROOT&#92;libraries&#92;src&#92;MVC&#92;Controller&#92;BaseController.php:730 8 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;helper.php:2554 9 hikashopController-&gt;execute() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;hikashop.php:73 10 require&#95;once() JROOT&#92;libraries&#92;src&#92;Dispatcher&#92;LegacyComponentDispatcher.php:71 11 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher::Joomla&#92;CMS&#92;Dispatcher&#92;{closure}() JROOT&#92;libraries&#92;src&#92;Dispatcher&#92;LegacyComponentDispatcher.php:73 12 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher-&gt;dispatch() JROOT&#92;libraries&#92;src&#92;Component&#92;ComponentHelper.php:361 13 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT&#92;libraries&#92;src&#92;Application&#92;AdministratorApplication.php:150 14 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT&#92;libraries&#92;src&#92;Application&#92;AdministratorApplication.php:195 15 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT&#92;libraries&#92;src&#92;Application&#92;CMSApplication.php:306 16 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;execute() JROOT&#92;administrator&#92;includes&#92;app.php:58 17 require&#95;once() JROOT&#92;administrator&#92;index.php:32  Hi, I got an error while saving the hikashop configuration in the administrator area, the error is &quot; Attempt to assign property &quot;currency&#95;locale&quot; on null &quot;, what should I do to fix this problem? Thanks in advance")*

Hi,

This indicates that something is trying to load the data of a currency based on its currency code, but the currency entry in the hikashop_currency table in the database doesn't exist.
It could be the case if, for example, you migrated the hikashop_config table where the main currency setting value is stored, while not migrating the hikashop_currency table, and that you previously had created a custom currency via the menu System&gt;Currencies and you were using it as you main currency.
Or more simply, if you were using a currency as main currency and then you either deleted it, or changed its currency code via the System&gt;Currencies menu.
So basically, that's something which should not happen normally.
Add the code: Code:

if(empty($element)) return;

after the line: Code:

function checkLocale(&amp;$element) {

in the file administrator/components/com_hikashop/classes/currency.php and it should prevent the error.
We'll include the change for the next version of HikaShop.

The following user(s) said Thank You: [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzc4NS1hdHRlbXB0LXRvLWFzc2lnbi1wcm9wZXJ0eS1jdXJyZW5jeS1sb2NhbGUtb24tbnVsbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")**
- [![diacotm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52238-diacotm "View diacotm's Profile") Topic Author
- [ Offline](/forum/user/52238-diacotm)

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 8 months ago [\#359281](#359281) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  Replied by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")* on topic *[Attempt to assign property "currency\_locale" on null](/forum/31-development/907785-attempt-to-assign-property-currency-locale-on-null#359281 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.2 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : An error has occurred.  0 Attempt to assign property &quot;currency&#95;locale&quot; on null  Call Stack # Function Location 1 () JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:2935 2 hikashopCurrencyClass-&gt;checkLocale() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:53 3 hikashopCurrencyClass-&gt;get() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;currency.php:2278 4 hikashopCurrencyClass-&gt;save() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;config.php:117 5 hikashopConfigClass-&gt;save() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;controllers&#92;config.php:87 6 ConfigController-&gt;store() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;controllers&#92;config.php:33 7 ConfigController-&gt;apply() JROOT&#92;libraries&#92;src&#92;MVC&#92;Controller&#92;BaseController.php:730 8 Joomla&#92;CMS&#92;MVC&#92;Controller&#92;BaseController-&gt;execute() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;helper.php:2554 9 hikashopController-&gt;execute() JROOT&#92;administrator&#92;components&#92;com&#95;hikashop&#92;hikashop.php:73 10 require&#95;once() JROOT&#92;libraries&#92;src&#92;Dispatcher&#92;LegacyComponentDispatcher.php:71 11 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher::Joomla&#92;CMS&#92;Dispatcher&#92;{closure}() JROOT&#92;libraries&#92;src&#92;Dispatcher&#92;LegacyComponentDispatcher.php:73 12 Joomla&#92;CMS&#92;Dispatcher&#92;LegacyComponentDispatcher-&gt;dispatch() JROOT&#92;libraries&#92;src&#92;Component&#92;ComponentHelper.php:361 13 Joomla&#92;CMS&#92;Component&#92;ComponentHelper::renderComponent() JROOT&#92;libraries&#92;src&#92;Application&#92;AdministratorApplication.php:150 14 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;dispatch() JROOT&#92;libraries&#92;src&#92;Application&#92;AdministratorApplication.php:195 15 Joomla&#92;CMS&#92;Application&#92;AdministratorApplication-&gt;doExecute() JROOT&#92;libraries&#92;src&#92;Application&#92;CMSApplication.php:306 16 Joomla&#92;CMS&#92;Application&#92;CMSApplication-&gt;execute() JROOT&#92;administrator&#92;includes&#92;app.php:58 17 require&#95;once() JROOT&#92;administrator&#92;index.php:32  Hi, I got an error while saving the hikashop configuration in the administrator area, the error is &quot; Attempt to assign property &quot;currency&#95;locale&quot; on null &quot;, what should I do to fix this problem? Thanks in advance")*

Wonderful!
It's worked!
Thanks so much

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzc4NS1hdHRlbXB0LXRvLWFzc2lnbi1wcm9wZXJ0eS1jdXJyZW5jeS1sb2NhbGUtb24tbnVsbD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.079 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
