This article is more for my future self, but it may help others.
Following the upgrade to Gravity Form 2.6.2, I found myself on several sites I maintain with a fatal error looking like:
[06-May-2022 20:30:52 UTC] PHP Fatal error: Uncaught Error: Call to a member function can_be_used() on bool in /var/www/my-great-website/wp-content/plugins/gravityforms/common.php:2813 Stack trace:
I didn’t dig too much to know the cause… I’ll do that later… when a client site is down… we correct it quickly 😉
To correct this error I just added
define( 'GF_CACHE_DEBUG', true );
in the `wp-config.php` and then go to resave the form settings (without changing anything)
This error occurs when the license verification fails. The developers of Gravity Forms are studying the issue and will soon publish a new version.
The added constant allows to validate the license without taking into account the cached data.
Tell me in comments if you had this error and this tip helped you!