Guillermo Espinoza пре 8 година
родитељ
комит
5773ee22f1
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Validator/Constraints/DeviceValidator.php

+ 1 - 1
Validator/Constraints/DeviceValidator.php

@@ -38,7 +38,7 @@ class DeviceValidator extends ConstraintValidator
     {
         $result = $this->webservice->makeGetRequest($this->deviceCheckUrl);
         $data = json_decode($result, true);
-        if ($data['result'] == false) {
+        if (isset($data['result']) && $data['result'] == false) {
             $this->context->buildViolation($constraint->message)
                     ->addViolation();
         }