FreePBX | Register | Issues | Wiki | Portal | Support

Activation Status: Undefined variable: var


#1

I’ve given up trying to get my system upgraded and need to move my activation back to my production machine. When I try I the error message " Activation Status: Undefined variable: var" Help!

Here’s what I get from the command line. I replaced the deployment id with an X.

root@freepbx ~]# fwconsole sysadmin activate X
Attempting to activate against deployment 'X'
Running /var/www/html/admin/modules/sysadmin/bin/activate_existing X
Asking for deployment X...Whoops\Exception\ErrorException: Undefined variable: var in file     /var/www/html/admin/libraries/BMO/DB_Helper.class.php on line 230S
Stack trace:
1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries        /BMO/DB_Helper.class.php:230
2. Whoops\Run->handleError() /var/www/html/admin/libraries/BMO/DB_Helper.class.php:230
3. FreePBX\DB_Helper->setConfig() /var/www/html/admin/modules/rmsadmin/Rmsadmin.class.php:324  
4. FreePBX\modules\RMSAdmin->updateLicense() :0
5. call_user_func_array() /var/www/html/admin/libraries/BMO/Hooks.class.php:269
6. FreePBX\Hooks->processHooks() /var/www/html/admin/modules/sysadmin  /Sysadmin.class.php:1944
7. FreePBX\modules\Sysadmin->notifyOnLicenseChange() /var/www/html/admin/modules/sysadmin/Reg.class.php:389
8. FreePBX\modules\Sysadmin\Reg->installLicence() /var/www/html/admin/modules/sysadmin/Reg.class.php:325
9. FreePBX\modules\Sysadmin\Reg->updateLicence() /var/www/html/admin/modules/sysadmin/bin/activate_existing:16

#2

Ok I think there is a typo in DB_Helper.class.php

if(isset(self::$cache[$mod][$id][$var])) {
   unset(self::$cache[$mod][$id][$var]);
}

should be

if(isset(self::$cache[$mod][$id][$val])) {
   unset(self::$cache[$mod][$id][$val]);
}

#3

or maybe

if(isset(self::$cache[$mod][$id][$key])) {
   unset(self::$cache[$mod][$id][$key]);
}

(Kapil Gupta) #4

Hi @freak please make sure you have latest edge release of framework module. seems like issue already been taken care.