You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: totum/common/Lang/RU.php
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ class RU implements LangInterface
24
24
'The function is only available for cycles tables.' => 'Функция доступна только для таблиц циклов.',
25
25
26
26
'System error. Action type not specified.' => 'Системная ошибка. Не указан тип действия.',
27
+
'Field [[%s]] of table [[%s]] in row with id [[%s]] contains non-numeric data'=>'Поле [[%s]] таблицы [[%s]] в строке с id [[%s]] содержит нечисловую информацию',
27
28
'Scheme source not defined.' => 'Не определен источник схемы.',
28
29
'Fill in the parameter [[%s]].' => 'Заполните параметр [[%s]].',
29
30
'Parametr [[%s]] is required.' => 'Параметр [[%s]] обязателен.',
if ($this->fields[$_w['field']]['type'] === 'number') {
429
+
$row = $this->Totum->getConfig()->getSql(false)->get('select id from ' . $this->model->getTableName()
430
+
. " where {$_w['field']}->>'v' !~ '^\d+(\.\d+)?$' ");
431
+
if ($row) {
432
+
$field = $_w['field'];
433
+
break;
434
+
}
435
+
}
436
+
}
420
437
}
421
-
unset($row);
438
+
if(!empty($field) && !empty($row)){
439
+
errorException::criticalException($this->translate('Field [[%s]] of table [[%s]] in row with id [[%s]] contains non-numeric data', [$field, $this->getTableRow()['name'], $row['id']]), $this->Totum);
440
+
}else{
441
+
errorException::criticalException($this->translate('One of number fields of table [[%s]] contains non-numeric data. We cann\'t find what and where', $this->getTableRow()['name']), $this->Totum);
442
+
}
422
443
}
444
+
throw$exception;
423
445
}
424
446
425
447
return$r;
@@ -1447,7 +1469,7 @@ protected function getWhereFromParams($paramsWhere, $withoutDeleted = true)
0 commit comments