Fist Draft

This commit is contained in:
cgfhtw
2024-09-20 14:31:25 +02:00
parent e6eea06900
commit 6c08741450
23 changed files with 2838 additions and 541 deletions
+7 -2
View File
@@ -106,10 +106,15 @@ class FHCAPI_Controller extends Auth_Controller
$error = [];
if (is_array($data)) {
if ($type == self::ERROR_TYPE_VALIDATION)
if ($type == self::ERROR_TYPE_VALIDATION) {
$error['messages'] = $data;
else
} elseif (array_is_list($data)) {
foreach ($data as $d)
$this->addError($d, $type);
return;
} else {
$error = $data;
}
} elseif (is_object($data)) {
$error = (array)$data;
} else {