Updating XML Google Maps plugin for newer versions of PHP

If you are using the XML Google Maps wordpress plugin (version 1.14.1 by Patrick Matusz), it has not been updated for a while, and won’t work quite right with newer versions of PHP.

If you are getting the following error message twice at the top of every page in your wordpress blog:
Warning: mysql_get_server_info(): No such file or directory in … on line 10

Change line 10 from:

 

if ( version_compare(mysql_get_server_info(), ‘4.1.0’, ‘>=’) ) {
to:
if ( version_compare($mysqli->server_info, ‘4.1.0’, ‘>=’) ) {

And that will make things work without the error messages.

Leave a Reply

Your email address will not be published. Required fields are marked *