Further fixes that caused issues with old PHP versions

pull/712/head
Iglocska 2015-10-09 16:38:48 +02:00
parent a2f87faf1f
commit 9223240efd
1 changed files with 2 additions and 1 deletions

View File

@ -168,7 +168,8 @@ class AppModel extends Model {
public function valueNotEmpty($value) {
$field = array_keys($value);
$field = $field[0];
if (!empty(trim($value[$field]))) return true;
$value[$field] = trim($value[$field]);
if (!empty($value[$field])) return true;
return ucfirst($field) . ' cannot be empty.';
}
}