timschofield / webERP

webERP Accounting and Business Administration ERP system
https://www.weberp.org
GNU General Public License v2.0
25 stars 112 forks source link

configuring auto update for currency exchange caused Currencies.php to fail #234

Open dalers opened 1 day ago

dalers commented 1 day ago

Perhaps I just don't understand the intended workflow.... I created a Canadian dollar currency, set the company currency to Canadian dollars, enabled currency exchange rate auto updating, logged out and back in. I expected to see current exchange rates updated (caused by the first person to login after enabling auto-updating), but instead the Currencies.php script now fails. Did I do something wrong?

  1. Created Canadian dollar currency

image

  1. Configured currency auto-updating

image

  1. Logged out and back in again, believing this will cause currency auto-updater to run

image

I'm guessing the page had an error because the footer isn't shown.

Following error was logged in httpd-error.log

[Wed Nov 13 18:23:03.222930 2024] [php:error] [pid 86189] [client 162.223.103.50:58315] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, bool given in /usr/local/www/weberp/Currencies.php:353\nStack trace:\n#0 {main}\n thrown in /usr/local/www/weberp/Currencies.php on line 353, referer: https://weberp.dalescott.net/index.php

dalers commented 1 day ago

iirc, the the Canadian Dollar currency did get added to the Currencies table....

(I don't have the db any more and will repeat the process with git pull and current default.sql)