Add is_array and hide irrelevant -ERR no reply
This commit is contained in:
parent
661035f8fb
commit
d24d5c1676
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
Portions created by the Initial Developer are Copyright (C) 2008-2021
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
|
|
@ -311,6 +311,8 @@ if (!class_exists('registrations')) {
|
||||||
|
|
||||||
//loop through registrations
|
//loop through registrations
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
//check if registrations exist
|
||||||
|
if (is_array($registrations)) {
|
||||||
foreach ($registrations as $registration) {
|
foreach ($registrations as $registration) {
|
||||||
|
|
||||||
//validate the submitted profile
|
//validate the submitted profile
|
||||||
|
|
@ -374,13 +376,16 @@ if (!class_exists('registrations')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//set message
|
//set message
|
||||||
if (is_array($response_api)) {
|
if (is_array($response_api)) {
|
||||||
$message = $response_message;
|
$message = $response_message;
|
||||||
foreach ($response_api as $registration_user => $response) {
|
foreach ($response_api as $registration_user => $response) {
|
||||||
|
if (trim($response['command']) != '-ERR no reply') {
|
||||||
$message .= "<br>\n<strong>".$registration_user."</strong>: ".$response['command'];
|
$message .= "<br>\n<strong>".$registration_user."</strong>: ".$response['command'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
message::add($message, 'positive', '7000');
|
message::add($message, 'positive', '7000');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue