Keyword

K2 + PHP 8: Error message at auto-login

  • Peter Wolff
  • Peter Wolff's Avatar Topic Author
  • Offline
  • New Member
More
5 days 12 hours ago #180715 by Peter Wolff
K2 + PHP 8: Error message at auto-login was created by Peter Wolff
I have Joomla version 3.10.11 and the current K2 version 2.11 [Build 20230112]. After that I switch to PHP 8. About the extension "iCagenda" () is an automatic login via an e-mail link via the front page, if the user is created. Since PHP 8 (8.0 or 8.2) I always get this error message (at error_reporting = 'maximum'):

Deprecated: Creation of dynamic property Joomla\CMS\Cache\Storage\FileStorage::$_threshold is deprecated in /
 0 - Undefined constant "K2_JVERSION"
Deprecated: Creation of dynamic property Joomla\CMS\User::$aid is deprecated in /


Is this error with "iCagenda" or with K2?
Here are the excerpts from the PHP files (the line with error in red):
_____________________________________________________________________
libraries/src/User/ on line 953
// Set time threshold value.  If the lifetime is not set, default to 60 (0 is BAD)
        // _threshold is now available ONLY as a legacy (it's deprecated).  It's no longer used in the core.
        if (empty($this->_lifetime))
        {
            $this->_threshold = $this->_now - 60;
            $this->_lifetime = 60;
        }
        else
        {
            $this->_threshold = $this->_now - $this->_lifetime;
        }
    }
_______________________________________________________________________
libraries/src/Cache/ on line 107

public function __wakeup()
    {
        // Initialise some variables
        $this->userHelper = new UserWrapper;
        $this->_params    = new Registry;

        // Load the user if it exists
        if (!empty($this->id) && $this->load($this->id))
        {
            // Push user into cached instances.
            self::$instances[$this->id] = $this;
        }
        else
        {
            // Initialise
            $this->id = 0;
            $this->sendEmail = 0;
            $this->aid = 0;
            $this->guest = 1;
        }
    }
}

Thank you, Peter

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum