diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php
index 74ef06fbf4..caccbb8a31 100644
--- a/app/provision/resources/classes/provision.php
+++ b/app/provision/resources/classes/provision.php
@@ -176,16 +176,6 @@ include "root.php";
return $mac;
}
- //define a function to check if a contact exists in the contacts array
- private function contact_exists($contacts, $uuid) {
- if (is_array($contacts[$uuid])) {
- return true;
- }
- else {
- return false;
- }
- }
-
//send http error
private function http_error($error) {
if ($error === "404") {
@@ -201,6 +191,16 @@ include "root.php";
exit();
}
+ //define a function to check if a contact exists in the contacts array
+ private function contact_exists($contacts, $uuid) {
+ if (is_array($contacts[$uuid])) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
private function contact_append(&$contacts, &$line, $domain_uuid, $device_user_uuid, $is_group){
$sql = "select c.contact_uuid, c.contact_organization, c.contact_name_given, c.contact_name_family, ";
$sql .= "c.contact_type, c.contact_category, p.phone_label,";
@@ -529,7 +529,9 @@ include "root.php";
if ($_SESSION['provision']['debug']['boolean'] == 'true'){
echo "
device disabled
";
}
- $this->http_error('404');
+ else {
+ $this->http_error('404');
+ }
exit;
}