Overview of the issue
In some scenarios, when you try to register your WPML license, you see the following error:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to OTGS\Installer\Collection::of() must be of the type array, null given, called in ...\wp-content\plugins\sitepress-multilingual-cms\vendor\otgs\installer\includes\class-wp-installer.php on line 1255 and defined in ...\wp-content\plugins\sitepress-multilingual-cms\vendor\otgs\installer\includes\utilities\Collection.php:20
Or this other slightly variation:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to OTGS\Installer\Collection::of() must be of the type array, bool given, called in .../wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/notices/Recommendation.php on line 37 and defined in .../wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/utilities/Collection.php:20
Our developers are working on it, however you can use the following workaround:
- Make a full backup of your site.
- Access your database.
- Open the wp_options table.
- Remove the wp_installer_settings key from the table.
- If the issue is still not fixed then also delete otgs_installer_recommendations_admin_notices key from the same table.
For the second error variation (the one with the bool type), you should follow the previous procedure as well, but remove only the otgs_installer_recommendations_admin_notices key.