mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Time::setValue() now conforms to DBField::setValue() for E_STRICT compliance.
This commit is contained in:
parent
9a9cebb369
commit
6b40377a1c
@ -16,7 +16,7 @@
|
||||
*/
|
||||
class Time extends DBField {
|
||||
|
||||
function setValue($value) {
|
||||
function setValue($value, $record = null) {
|
||||
if($value) {
|
||||
if(preg_match( '/(\d{1,2})[:.](\d{2})([a|A|p|P|][m|M])/', $value, $match )) $this->TwelveHour( $match );
|
||||
else $this->value = date('H:i:s', strtotime($value));
|
||||
|
Loading…
Reference in New Issue
Block a user