Fix multiple PHP warnings

This commit is contained in:
markjcrane
2025-11-01 19:58:21 -06:00
parent a675660473
commit bf5bb4f642
41 changed files with 539 additions and 442 deletions

View File

@@ -84,6 +84,8 @@
private $extension;
private $number_alias;
private $toll_allow;
private $toggle_field;
private $toggle_values;
/**
* called when the object is created
@@ -156,6 +158,10 @@
*/
public function toggle(array $records) {
//add multi-lingual support
$language = new text;
$text = $language->get();
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
@@ -170,14 +176,10 @@
//check we have permission for this action
if (permission_exists('call_forward')) {
//add multi-lingual support
$language = new text;
$text = $language->get();
// initialize an empty array
$uuids = [];
$extensions = [];
//get current toggle state
foreach ($records as $x => $record) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
@@ -262,7 +264,7 @@
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if ($settings->get('device', 'feature_sync', false)) {
if ($this->settings->get('device', 'feature_sync', false)) {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $this->domain_name;

View File

@@ -51,6 +51,7 @@
public $debug;
public $extension_uuid;
public $extension;
public $number_alias;
public $enabled;
/**
@@ -110,7 +111,7 @@
$user_status = "Logged Out";
$esl = event_socket::create();
if ($esl->is_connected()) {
$switch_cmd .= "callcenter_config agent set status ".$this->username."@".$this->domain_name." '".$user_status."'";
$switch_cmd = "callcenter_config agent set status ".$this->username."@".$this->domain_name." '".$user_status."'";
$esl->request('api '.$switch_cmd);
}

View File

@@ -430,7 +430,7 @@
$p->delete('follow_me_edit', 'temp');
//send feature event notify to the phone
if ($settings->get('device', 'feature_sync', false)) {
if ($this->settings->get('device', 'feature_sync', false)) {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $this->domain_name;