Found issue with PHP 7.1+
-
There’s an issue on line 1025 in gravityforms-update-post.php where the declared variable in the use() is the same as the declared parameter in the anonymous function.
Here’s the error I recieved in testing (using PHP Compatibility Checker):
1025 | ERROR | Variables bound to a closure via the use construct cannot use the same name as superglobals, $this, or a declared parameter since PHP 7.1.
Here’s what that line looks like:
add_filter( 'gform_field_value_' . $field['inputName'], function($value) use($value) { return $value; } );
All I did was change the declared variable and return variable from
$value
to$val
, and it seems to fix the issue:add_filter( 'gform_field_value_' . $field['inputName'], function($val) use($value) { return $val; } );
- The topic ‘Found issue with PHP 7.1+’ is closed to new replies.