E_COMPILE_ERROR false alarm?

I have a client (hosted at WP Engine, which may be relevant) who has gotten this error a couple of times recently:

An error of type E_COMPILE_ERROR was caused in line 3964 of the file /wp-content/plugins/gravityforms/common.php. Error message: Array and string offset access syntax with curly braces is no longer supported

They’re running GF 2.9.11 under WP 6.8.1. I know 2.9.11.1 is out but there are no changes in common.php.

Here’s the entire block of code around line 3964. (That specific line is the foreach statement.)

$fields = '';
foreach ( $inputs as $input ) {
	$fields .= sprintf( "<input name='input_%s' class='gform_hidden' type='hidden' value='%s'/>", $input['id'], esc_attr( rgar( $value, strval( $input['id'] ) ) ) );
}

I don’t seen anything here even remotely like what the error is indicating, and I have plenty of other client sites running Gravity Forms without this issue. Any ideas how this could be happening?

Try reinstalling the plugin, that kind of error usually happens when the plugin was manually updated via FTP or the hosting file manager and some of the files weren’t updated, and the old file isn’t compatible with the PHP version in use.

Nope, it’s not that. I downloaded the entire set of files of the plugin as they are on the site and ran a diff against a fresh copy and it’s exactly the same.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.