The Health Check wizard must be run when upgrading in order to evaluate your instance’s ability to move to the target version. During the health check, various types of issues may be detected which can affect your ability to upgrade. This article will cover how to resolve a “$this usage” error reported by the health check.
This error generates an output similar to the following in health check:
In this example, the function,
$this, identified in the health check error is found in the
/accounts_bugs_1_Accounts.php file. The line of code referencing this hook is as follows:
'account_id' => $this->_focus->id,
The target version of Sugar does not support using
$this objects in the metadata. In order to proceed with the upgrade, either update or remove the offending line of code in the specified file so that it no longer utilizes the
Once the necessary change has been made, please navigate to Admin > Repair and perform a “Quick Repair and Rebuild” to ensure that the changes are synced between the application and database. Then, perform the health check again to confirm that the error is no longer reported.