• Resolved tagsdomino

    (@tagsdomino)


    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://ww.wp.xz.cn/plugins/wp-places/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gary Kovar

    (@binarygary)

    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

    (@binarygary)

    Pushed version 1.1.18 using str_replace instead of preg_replace for that particular issue.

    Thread Starter tagsdomino

    (@tagsdomino)

    Nice!

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

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