e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
322 stars 214 forks source link

e107::getRegistry() is not working in login_menu plugin #4968

Open Jimmi08 opened 1 year ago

Jimmi08 commented 1 year ago

Bug Description

This code is not working:

    function parse_external_list($active=false, $order=true)
    {
        //prevent more than 1 call
        if(($tmp = e107::getRegistry('loginbox_elist')) !== FALSE) return $tmp;

With first time calling value is NULL, so this check fails.

I don't know what is correct return value from getRegistry() - false or NULL - or if this is only PHP 8 related

This can be on more places, so I am posting it here as bug.

Yeah, this code fixed problem, but again - maybe this should be fixed somewhere else.

$tmp = e107::getRegistry('loginbox_eplug_data_' . $plugid, false); 
if($tmp  !== FALSE) return $tmp;

Thanks