Troubleshooting a TypeError provisioning Plesk services

Symptom

After applying the 8.2.0 update, you may observe a TypeError error message when provisioning Plesk services:

TypeError: Argument 1 passed to WHMCS\Service\Service::removeMxRecords() must be of the type array or null, string given, called in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/MarketConnect/Services/OX.php

or

TypeError: Return value of Plesk_Api::_escapeValue() must be of the type string, null returned in /path/to/whmcs/modules/servers/plesk/lib/Plesk/Api.php:0

Solution

Please apply the 8.2.1 Maintenance Release via the Utilities > Update WHMCS page.

Hotfix

A hotfix has been created for 8.2.0 only to correct this behaviour:

https://whmcs.community/files/file/167-core-16765-typeerror-provisioning-plesk-services/