Title: PHP 7.0 issue?
Last modified: August 31, 2016

---

# PHP 7.0 issue?

 *  Resolved [tagsdomino](https://wordpress.org/support/users/tagsdomino/)
 * (@tagsdomino)
 * [10 years ago](https://wordpress.org/support/topic/php-70-issue/)
 * Hi Gary,
 * Great little plugin – thank you! Just to let you know that on my server running
   PHP 7.0 and the latest WordPress I received the following error when editing 
   and saving a page with the plugin:
 * `Warning: preg_replace(): No ending delimiter '&' found in ...../wp-content/plugins/
   wp-places/includes/googlePlaces.php on line 8`
 * In order to solve it I changed this:
 * `$location=preg_replace("&", "and", $location);`
 * …to this:
 * `$location=preg_replace("~&~", "and", $location);`
 * And it seems to be working. Hope this helps a little.
 * Could you use str_replace instead?
 * Thanks again for the plugin!
 * [https://wordpress.org/plugins/wp-places/](https://wordpress.org/plugins/wp-places/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Gary Kovar](https://wordpress.org/support/users/binarygary/)
 * (@binarygary)
 * [10 years ago](https://wordpress.org/support/topic/php-70-issue/#post-7403080)
 * Thanks for the heads up.
    I’ll try it…
 * There’s not logical reason to not use str_replace()…I think I just “fixed” it
   in a hurry when I ran in to issues with the ampersand before.
 * Thanks for taking the time to alert me to it.
 *  Plugin Author [Gary Kovar](https://wordpress.org/support/users/binarygary/)
 * (@binarygary)
 * [10 years ago](https://wordpress.org/support/topic/php-70-issue/#post-7403081)
 * Pushed version 1.1.18 using str_replace instead of preg_replace for that particular
   issue.
 *  Thread Starter [tagsdomino](https://wordpress.org/support/users/tagsdomino/)
 * (@tagsdomino)
 * [10 years ago](https://wordpress.org/support/topic/php-70-issue/#post-7403118)
 * Nice!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP 7.0 issue?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-places_c3c0c0.svg)
 * [WP_Places](https://wordpress.org/plugins/wp-places/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-places/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-places/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-places/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-places/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [tagsdomino](https://wordpress.org/support/users/tagsdomino/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/php-70-issue/#post-7403118)
 * Status: resolved