Parse error : gform_field_value_ case list

Issue #27 resolved
Nicolas F created an issue

Hi,

It seems a great job this plugin but

When I activate the plugin, there is a big bug :

Parse error: syntax error, unexpected T_FUNCTION in /wp-content/plugins/jupitercow-gravity-forms-update-post-0cfceeda5a35/gravityforms-update-post.php on line 866

The line probleme :

add_filter( 'gform_field_value_' . $field['inputName'], function($value) use($value) { return $value; } );

In the other case the line is replaced by another function...


My config : Wordpress 3.9.1 / PHP 5.2 Plugin : Gravity Forms Version 1.8.8 Gravity Forms: Post Updates Version 1.2.4 Gravity Forms CSS Ready Class Selector Version 1.1 Gravity Forms Data Persistence Add-On Version 3.0 Gravity Forms User Registration Add-On Version 1.8 Advanced Access Manager Version 2.7.1 Custom Field Suite Version 2.3.1 Revolution Slider - Premium responsive slider Version 4.2.3 User Role Editor

Comments (5)

  1. Jacob Snyder repo owner

    This plugin is not compatible currently with PHP 5.2. I have tried to make that happen and have been unable to get that functionality replaced with a suitable replacement. Sorry.

    I would work with your host to get PHP upgraded. It is on 5.4 now and 5.5 is around the corner in alpha. I know WordPress supports some versions of 5.2 currently, but it is too limiting for what this plugin needs to do at this time.

    The only fix beyond upgrading PHP is to delete that section from your version and after any updates.

    from: case 'list': around 852 to the following break; around line 868.

    This will disable list fields from working, but, as long as you don't need to support list type fields when editing, you should be good.

  2. Jacob Snyder repo owner

    The next update will make the requirements clearer. I am really sorry for the confusion, but we just realized the issue last week.

  3. Jacob Snyder repo owner

    Right. I have tried using "create_function" which is supported in 5.2, and will try to run it past a couple other people, but I couldn't get that to work for this specific usage.

  4. Log in to comment