John Heenan Posted March 28, 2024 Report Posted March 28, 2024 Issue is unable to change plan used on Virtualmin, with Virtualmin module through Blesta, with upgrade/downgrade. Two stage manual change is a workaround (change without module on Blesta and then change directly on Virtualmin) Steps to reproduce are: Client, Service, Manage, Upgrade/Downgrade, change package/term (with Use module ticked -module is Virtualmin), Save URL page before error is .../admin/clients/editservice/...... Result is HTTP 500 error Blesta general error in logs: general.ERROR: Uncaught Exception TypeError: "array_key_exists(): Argument #2 ($array) must be of type array, stdClass given" at .../blesta/components/modules/virtualmin/virtualmin.php line 867 {"exception":"[object] (TypeError(code: 0): array_key_exists(): Argument #2 ($array) must be of type array, stdClass given at .../blesta/components/modules/virtualmin/virtualmin.php:867)"} OS is Debian 12, Blesta version is 5.9.3, PHP version is 8.2.7, Blesta Virtualmin module version is 1.8.0 This bug was originally reported in error to the 5.9 beta bugs section. Quote
John Heenan Posted March 28, 2024 Author Report Posted March 28, 2024 I fixed the bug reported above myself by editing line 867 in file blesta/components/modules/virtualmin/virtualmin.php from: if (!array_key_exists($key, $service_fields) || $vars[$key] != $service_fields->$key) { to: if (!array_key_exists($key, (array)$service_fields) || $vars[$key] != $service_fields->$key) { However, although this restores behaviour to same as with php7, a detailed look at the effects showed only the plan name was changed in Virtualmin. This is another bug. I will post details of this additionally discovered bug after I have tested what may be a fix for it. Quote
Paul Posted March 28, 2024 Report Posted March 28, 2024 Thanks for the report, we've created the following task: https://dev.blesta.com/browse/CORE-5156 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.