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
|
||||
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.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -311,6 +311,8 @@ if (!class_exists('registrations')) {
|
|||
|
||||
//loop through registrations
|
||||
if ($fp) {
|
||||
//check if registrations exist
|
||||
if (is_array($registrations)) {
|
||||
foreach ($registrations as $registration) {
|
||||
|
||||
//validate the submitted profile
|
||||
|
|
@ -374,13 +376,16 @@ if (!class_exists('registrations')) {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//set message
|
||||
if (is_array($response_api)) {
|
||||
$message = $response_message;
|
||||
foreach ($response_api as $registration_user => $response) {
|
||||
if (trim($response['command']) != '-ERR no reply') {
|
||||
$message .= "<br>\n<strong>".$registration_user."</strong>: ".$response['command'];
|
||||
}
|
||||
}
|
||||
message::add($message, 'positive', '7000');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue