Error when trying to delete webRTC extension

When i try deleting a webRTC Extension i get the error below

Whoops\Exception\ErrorException Call to a member function database_put() on null

/var/www/html/admin/modules/languages/Languages.class.php
if(isset($request[‘view’]) && $request[‘view’] == ‘form’){
return load_view(DIR."/views/bootnav.php",array());
}
}
public function getUserLanguage($xtn) {
$langcode = $this->FreePBX->astman->database_get(“AMPUSER”,$xtn."/language");
return $langcode;
}
public function getAllUserLanguages() {
$items = $this->FreePBX->astman->database_show(‘AMPUSER’);
$final = array();
foreach($items as $key => $value) {
if(preg_match(’/AMPUSER/(\d+)/language/’,$key,$matches) && !empty($value)) {
$final[$matches[1]] = $value;
}
}
return $final;
}
public function delUserLanguage($xtn) {
return $astman->database_deltree(“AMPUSER/$xtn/language”);
}
public function updateUserLanguage($ext, $langcode) {
return $astman->database_put(“AMPUSER”,$ext."/language",$langcode);
}
//Bulk functions
public function getAllLanguages() {
$au = $this->FreePBX->astman->database_show(‘AMPUSER’);
$ret = array();
foreach($au as $k => $v){
$temp = explode(’/’,$k);
if($temp[3] == ‘language’){
$ret[$temp[2]] = $v;
}
}
return $ret;
}
public function setLanguageByExtension($extension, $language){
return $this->FreePBX->astman->database_put(‘AMPUSER/’.$extension,‘language’,$language);
}
//Bulkhandler hooks

You are running the edge version of the Languages module, fix is to downgrade to stable:

fwconsole ma downloadinstall languages --tag 13.0.6

Thank you Lorne, issue was resolved.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.