PHP version 5.3.29 Error: class.submit.php file line 156
-
Hi, i have a problem with the plugin.
I’m getting this error when i install the plugin:
Parse error: syntax error, unexpected ‘[‘ in /home/public_html/wp-content/plugins/cf7-mautic-extention/inc/class.submit.php on line 156
But it’s only happening on my production server with PHP Version 5.3.29.
On my development server with PHP Version 5.6.17 the plugin fuctions perfectly.
This is the part of the code that’s giving the error, file class.submit.php:
/** * Get User's IP * * @return string * @since 0.0.1 */ private function _get_ip() { $ip_list = [ 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED' ]; foreach ( $ip_list as $key ) { if ( ! isset( $_SERVER[ $key ] ) ) { continue; } $ip = esc_attr( $_SERVER[ $key ] ); if ( ! strpos( $ip, ',' ) ) { $ips = explode( ',', $ip ); foreach ( $ips as &$val ) { $val = trim( $val ); } $ip = end ( $ips ); } $ip = trim( $ip ); break; } return $ip; } }
I really don’t know how to solve this, can you help me?
Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP version 5.3.29 Error: class.submit.php file line 156’ is closed to new replies.