$bugfixes...
This commit is contained in:
parent
5227fe6a94
commit
646ffc1910
|
@ -28,7 +28,7 @@ function event_config_edit_controller()
|
||||||
$teardown_end_date = null;
|
$teardown_end_date = null;
|
||||||
|
|
||||||
$event_config = EventConfig();
|
$event_config = EventConfig();
|
||||||
if (empty($event_config)) {
|
if (!empty($event_config)) {
|
||||||
$event_name = $event_config['event_name'];
|
$event_name = $event_config['event_name'];
|
||||||
$buildup_start_date = $event_config['buildup_start_date'];
|
$buildup_start_date = $event_config['buildup_start_date'];
|
||||||
$event_start_date = $event_config['event_start_date'];
|
$event_start_date = $event_config['event_start_date'];
|
||||||
|
|
|
@ -42,9 +42,10 @@ function check_request_datetime($date_name, $time_name, $allowed_days, $default_
|
||||||
function parse_date($pattern, $value)
|
function parse_date($pattern, $value)
|
||||||
{
|
{
|
||||||
$datetime = DateTime::createFromFormat($pattern, trim($value));
|
$datetime = DateTime::createFromFormat($pattern, trim($value));
|
||||||
if (is_null($datetime)) {
|
if (!$datetime) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $datetime->getTimestamp();
|
return $datetime->getTimestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,11 @@ class RoomModelTest extends TestCase
|
||||||
|
|
||||||
$room = Room($this->room_id);
|
$room = Room($this->room_id);
|
||||||
|
|
||||||
$this->assertNotFalse($room);
|
$this->assertNotEmpty($room);
|
||||||
$this->assertNotNull($room);
|
$this->assertNotNull($room);
|
||||||
$this->assertEquals($room['Name'], 'test');
|
$this->assertEquals($room['Name'], 'test');
|
||||||
|
|
||||||
$this->assertNull(Room(-1));
|
$this->assertEmpty(Room(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown()
|
||||||
|
|
Loading…
Reference in New Issue