Editing Existing Memberships Fails with PHP Error on non English Installs
Overview
When you try to edit a membership (change dates or source for example) and and save the form there is an error. I tried this on two separate installations, two different versions.
Reproduction steps
- Install CiviCRM with install scripts for German or Serbian
- Add a Membersip
- Edit a membership and click save
Current behaviour
Trows an error (I get from Drupal). TypeError: Return value of CRM_Financial_BAO_Order::getFinancialTypeID() must be of the type int, null returned in CRM_Financial_BAO_Order->getFinancialTypeID() (line 318 of .../sites/all/modules/civicrm/CRM/Financial/BAO/Order.php).
CiviCRM 5.39.1, 5.40.3 (still doesn't work, but no error)
PHP 7.3.28
MySQL 5.7.33