1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-22 06:13:57 +02:00
This commit is contained in:
Ryan Cramer
2020-07-24 08:51:13 -04:00
parent 8c5ed3e0b1
commit ada963a2f1

View File

@@ -1371,7 +1371,9 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
throw new WireException("Unknown column '$col' for field $field->name");
} else if($col === 'filedata' || strpos($col, 'description') === 0) {
throw new WireException("Column '$col' cannot be saved with $this::saveFileCols()");
}
} else if($col === 'created' || $col === 'modified') {
if(ctype_digit("$value")) $value = date('Y-m-d H:i:s', (int) $value);
}
$sets[] = "$col=:$col";
$binds[":$col"] = $value;
}