Jump to content
thirty bees forum

Help resolving PHP error for 8.x upgrade


Recommended Posts


I have a module with a php 8 error that I just can't figure out how to resolve. I'm sure it's very easy, but I'm struggling. Anyone know how to resolve? @datakick?


This is the error:


This is the code snippet causing issue:

    public function __get($name)
    if ($name === 'module') {
        return $this->module = Module::getInstanceByName('rg_smartpopup');
    if ($name === 'popup') {
        if (!(int) $this->id_popup) {
            throw new PrestaShopException('The property `id_popup` is required.');
        return $this->popup = new RgSpPopup((int) $this->id_popup, (int) $this->id_lang);
    return parent::__get($name); // Ensure compatibility with ObjectModelCore
Link to comment
Share on other sites

One more question for you @datakick. I've updated to PHP 8.3 now and all is functioning correctly. When I review error logs though, I have many deprecation warnings around controllers::$admin_webpath making dynamic properties. Is there an easy fix to resolve those? Here is an example of just one:



Link to comment
Share on other sites

There is some (probably module/override) code that access this property on front-office controllers. You have to figure out what code is that, and fix it -- it should probably work with back-office controllers only.

Look at stacktrace for this error to figure out what code attempts to access the property.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...