• Resolved erwinbr

    (@erwinbr)


    After updating your plugin to 3.8.7, I started toget fatal errors on the backend. The actual error message I received was:

    PHP message: PHP Fatal error: Declaration of StellarWP\Learndash\lucatume\DI52\Container::has($id)
    must be compatible with Psr\Container\ContainerInterface::has(string $id): bool in …/httpdocs/wp-content/plugins/sfwd-lms/vendor-prefixed/lucatume/di52/src/Container.php on line 306.

    It turns out that:

    • in your plugin, you updated to the latest version of the psr/container interface, which is fine and good,
    • but, this interface is used in (many) other plugins that have not yet updated their code to the latest version of this interface.
    • and its definition will only be (auto)loaded once, in my case apparently picking your version (i.e, your autoloader runs before that from other plugins).

    I would like to ask you to solve this by:

    • reverting to the older psr/container version
    • while keeping your code satisfying the newer one (keep bool as return type for has()), as this is accepted by php, while the other way (not defining a return type in a class while the interface does) is not.
    • I will contact the other plugin developers to ask them to do the same, so that one day we may be able to upgrade to the latest version of the psr container interface.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Kevin Behrens

    (@kevinb)

    @erwinbr Thanks for your detailed report and suggestions. We are looking into this issue and will follow up as soon as a solution is ready.

    Thread Starter erwinbr

    (@erwinbr)

    Fine, that you are looking into this.

    I forgot to mention that while looking into the problem, I also ran your code through the static checker of my IDE and found that the class Module in wp-content/plugins/press-permit-core/vendor/publishpress/wordpress-version-notices/src/Module/Footer/Module.php does not seem to implement the interface AdInterface as it should. This will give a fatal error as well when loaded.

    Plugin Author andergmartins

    (@andergmartins)

    Hi @erwinbr thanks for reporting that. We are working on a fix for that as well. We will keep you posted.

    Plugin Author Steve Burge

    (@stevejburge)

    @swanzack @erwinbr Please check with today’s release of 3.9.0 which should solve the problem.

    Thread Starter erwinbr

    (@erwinbr)

    I updated your plugin and so far, no more problems. Thanks.

    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    We are glad to hear that. Thanks for the feedback @erwinbr

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Since your 3.8.7: fatal error in other plugin(s)’ is closed to new replies.