• Resolved wbeaumo

    (@wbeaumo)


    I’m preparing to upgrade a site’s PHP to 8, so I’ve run the command “php -l” on all the PHP files. This plugin has a file that does not pass the syntax check. I get the message: “PHP Fatal error: Declaration of WPGMZA\DOMElement::remove() must be compatible with DOMElement::remove(): void in ./wp-content/plugins/wp-google-maps/includes/class.dom-element.php on line 743” I get this message with PHP 8.0, 8.1, and 8.2. I do not get it with 7.4.

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

    (@dylanauty)

    Hi @wbeaumo,

    Thank you for getting in touch, we do appreciate your time.

    I can confirm that the plugin is compatible with PHP 8 and the reason the file does not pass the syntax check is because the file in question is only loaded when you are below PHP 8.

    Instead, we would load the PHP 8 specific file of the DomElement module as seen below:

    • wp-content\plugins\wp-google-maps\includes\php8\class.dom-element.php

    This was done due to the underlying native library changing with the release of PHP 8, meaning it was not easily possible to support both versions with a single file. As a result we introduced two version of the DomElement class to account for users above/below PHP8

    I hope this helps?

    Thread Starter wbeaumo

    (@wbeaumo)

    Thank you for your detailed reply. I understand now.

    Plugin Author DylanAuty

    (@dylanauty)

    Happy to help! Have a nice day further.

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

The topic ‘Compatibility with PHP 8’ is closed to new replies.