impress-org / google-maps-builder

One Google Maps plugin to rule them all. Google Maps Builder is intuitive, sleek, powerful and easy to use. Forget the rest, use the best.
https://wordpress.org/plugins/google-maps-builder/
32 stars 9 forks source link

parseCSV deprecated constructor notice in WP admin (PHP 7+) #241

Closed kevinwhoffman closed 7 years ago

kevinwhoffman commented 7 years ago

Issue Overview

Notice appears at the top of every WP admin screen upon installation.

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; parseCSV has a deprecated constructor in /Users/kevin/Sites/wordimpress-dev-sites/gmb/wp-content/plugins/maps-builder-pro/includes/admin/import-export/parsecsv.lib.php on line

Possible Solution

Rename the constructor method from parseCSV() to __construct().

Steps to Reproduce

  1. Install WP 4.7.2 and Maps Builder Pro 2.1.1 on PHP 7.0.13 or above.
  2. define('WP_DEBUG', true);
  3. Note deprecated notice in WP admin.

Related

https://wordpress.org/support/topic/install-error-parsecsv-has-a-deprecated-constructor/