Compatibility
Gravity Forms is compatible with PHP 8.1.
Known Issues
There are currently no known issues with Gravity Forms and PHP 8.1. Note that all of the issues listed below are fixed in the listed versions of the respective plugins.
Return type of Gravity_Forms\Gravity_Forms\External_API\GF_API_Response::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/external-api/class-gf-api-response.php
– fixed in 2.6.1.2Return type of GF_Field::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.php
– fixed in 2.6.1.2Return type of GF_Field::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.php
– fixed in 2.6.1.2Return type of GF_Field::offsetSet($offset, $data) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.php
– fixed in 2.6.1.2Return type of GF_Field::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/fields/class-gf-field.php
– fixed in 2.6.1.2version_compare(): Passing null to parameter #1 ($version1) of type string is deprecated in /includes/addon/class-gf-addon.php
– fixed in 2.6.1.2Gravity_Forms\Gravity_Forms\License\GF_License_API_Response implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /includes/license/class-gf-license-api-response.php
– fixed in 2.6.1.2Constant FILTER_SANITIZE_STRING is deprecated in /includes/duplicate-submissions/class-gf-duplicate-submissions-handler.php
– fixed in 2.6.1.2json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /forms_model.php
– fixed in 2.6.1.2version_compare(): Passing null to parameter #2 ($version2) of type string is deprecated in /gravityforms.php
– fixed in 2.6.1.2Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.php
– fixed in 2.6.1.2Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.php
– fixed in 2.6.1.2Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetSet($offset, $data) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.php
– fixed in 2.6.1.2Return type of Gravity_Forms\Gravity_Forms\Settings\Fields\Base::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/settings/fields/class-base.php
– fixed in 2.6.1.2strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /includes/settings/fields/class-base.php
– fixed in 2.6.1.2str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /includes/settings/fields/class-base.php
– fixed in 2.6.1.2htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /includes/settings/fields/class-text.php
– fixed in 2.6.1.2version_compare(): Passing null to parameter #2 ($version2) of type string is deprecated in /includes/system-status/class-gf-update.php
– fixed in 2.6.1.2strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /export.php
– fixed in 2.6.1.2str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /export.php
– fixed in 2.6.1.2dirname(): Passing null to parameter #1 ($path) of type string is deprecated in /includes/addon/class-gf-addon.php
– fixed in 2.7.3basename(): Passing null to parameter #1 ($path) of type string is deprecated in /includes/addon/class-gf-addon.php
– fixed in 2.7.3strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /includes/assets/class-gf-asset-processor.php
– fixed in 2.7.10str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /includes/addon/class-gf-auto-upgrade.php
– fixed in 2.7.10str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in common.php
– fixed in 2.7.10
Reporting Issues
If you think you have discovered a PHP 8.1-related issue with a Gravity Forms product in your own testing, please let us know by contacting Support. Thank you for contributing!