Support » Plugin: OSM - OpenStreetMap » PHP 7 compatibility

  • Resolved Adrian

    (@adriandw)



    I am planning to upgrade my site to PHP 7.
    The PHP compatibility checker reports this

    FILE: /wp-content/plugins/osm/osm.php
    -------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------
     207 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    -------------------------------------

    Can you fix this?
    thanks

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

    (@photoweblog)

    Can you post the warning based on the latests WP OSM Plugin version?

    jhaand

    (@jhaand)

    We see the following error.

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Osm has a deprecated constructor in /home/vhosts/caminostones.com/httpdocs/wordpress/wp-content/plugins/osm/osm.php on line 206

    Change

    class Osm
    {

    function Osm() {

    To

    class Osm
    {

    function __construct() {

    Also see the manual.
    http://php.net/manual/en/language.oop5.decon.php

    Plugin Author photoweblog

    (@photoweblog)

    Thanks for the lines … was fixed in an previous versin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP 7 compatibility’ is closed to new replies.