-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with PHP 7.1 #1377
Comments
CauseCause of the error can be found here: https://github.com/WordImpress/Give/blob/master/includes/formatting.php#L437-L443 This error is caused by Quick FixThe quick fix is to change the following on line 437 from: A proper fix will be incorporated into the next release. For clarity, the variable should not be named |
Note the error is caused by a CMB2 function that doesn't exist in |
@kevinwhoffman We can not user short tag for now because this will not work in PHP 5.3.
For ref: http://php.net/manual/en/migration54.new-features.php |
@ravinderk Thanks for the heads up. I edited my fix above to use |
Issue Overview
Users currently cannot use Give with PHP 7.1
Expected Behavior
We should be current with the latest available PHP version. Siteground for example offers a one-click upgrade to PHP 7.1.
Current Behavior
If a user upgrades to PHP 7.1 Give works generally, but not on the Form Edit screen. This is what they see:
`Fatal error: Uncaught Error: [] operator not supported for strings in .../wp-content/plugins/give/includes/formatting.php:443 Stack trace: #0 .../wp-content/plugins/give/includes/libraries/cmb2/includes/CMB2_Base.php(283): give_cmb_amount_field_render_row_cb(Array, Object(CMB2_Field)) #1 .../wp-content/plugins/give/includes/libraries/cmb2/includes/CMB2_Base.php(258): CMB2_Base->do_callback('give_cmb_amount...') #2 .../wp-content/plugins/give/includes/libraries/cmb2/includes/CMB2_Base.php(235): CMB2_Base->get_param_callback_result('render_row_cb') #3 .../wp-content/plugins/give/includes/libraries/cmb2/includes/CMB2_Field.php(759): CMB2_Base->peform_param_callback('render_row_cb') #4 .../wp-content/plugins/give/includes/libraries/cmb2/includes/CMB2.php(315): CMB2_Field->render_field() #5 .../wp-content/plugins/give/includes/librari in .../wp-content/plugins/give/includes/formatting.php on line 443
Steps to Reproduce (for bugs)
The error can currently be seen on this test site (which our team has credentials to internally):
http://php7.mattcromwell.com/donations/standard-form/
That site has been upgraded to PHP 7.1 via Siteground's one-click PHP Version manager.
The text was updated successfully, but these errors were encountered: