Support » Plugin: Members List Plugin » Getting fatal error after latest update

  • I’m getting an error after the latest update.

    Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /home3/njlla/public-html/wp-conent/plugins/members-list/class/google_maps/php on line 52

    My site is njlla.org. Sorry – we’re a bunch of volunteers running this site so I’m the most techie of a tragically untechie bunch which is not saying much. I hope this info means something to you? For now I’m leaving the plugin de-activated but I did like it quite a bit and would like to use it again. Ideas? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I also get this error. Any solutions?

    I got this error too. It’s a quick fix, though it does mean modifying the plugin’s files.

    Open /wp-content/plugins/members-list/class/google_maps.php and change lines 52 through 61 to this:

    $r = $this->h->get(array(
    	'url'		=>	'http://maps.google.com/maps/api/geocode/json?sensor=false&language=en&address='.$a,
    	'options'	=>	array(
    	'RETURNTRANSFER'	=>	true,
    	//'FOLLOWLOCATION'	=>	true
    ),
    	'headers'	=>	array(
    		'Accept-Charset'	=>	'UTF-8'
    	)
    ));

    Then do the same to lines 71 to 80:

    $r = $this->h->get(array(
    	'url'		=>	'https://maps.googleapis.com/maps/api/geocode/json?components=country&key='.$k.'&address='.$a,
    	'options'	=>	array(
    		'RETURNTRANSFER'	=>	true,
    		//'FOLLOWLOCATION'	=>	true
    	),
    	'headers'	=>	array(
    		'Accept-Charset'	=>	'UTF-8'
    	)
    ));

    Basically, you’re swapping the square bracket notation for the array() syntax – where you see an open square bracket [ swap it for array( and then look for the corresponding closing square bracket ] and swap it for a closing regular bracket ).

    • This reply was modified 1 year, 1 month ago by  martinspain. Reason: Formatting

    This worked for me – thank you so much!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting fatal error after latest update’ is closed to new replies.