$bugfixes...

This commit is contained in:
Igor Scheller 2018-01-14 18:47:15 +01:00
parent 5227fe6a94
commit 646ffc1910
3 changed files with 5 additions and 4 deletions

View File

@ -28,7 +28,7 @@ function event_config_edit_controller()
$teardown_end_date = null;
$event_config = EventConfig();
if (empty($event_config)) {
if (!empty($event_config)) {
$event_name = $event_config['event_name'];
$buildup_start_date = $event_config['buildup_start_date'];
$event_start_date = $event_config['event_start_date'];

View File

@ -42,9 +42,10 @@ function check_request_datetime($date_name, $time_name, $allowed_days, $default_
function parse_date($pattern, $value)
{
$datetime = DateTime::createFromFormat($pattern, trim($value));
if (is_null($datetime)) {
if (!$datetime) {
return null;
}
return $datetime->getTimestamp();
}

View File

@ -24,11 +24,11 @@ class RoomModelTest extends TestCase
$room = Room($this->room_id);
$this->assertNotFalse($room);
$this->assertNotEmpty($room);
$this->assertNotNull($room);
$this->assertEquals($room['Name'], 'test');
$this->assertNull(Room(-1));
$this->assertEmpty(Room(-1));
}
public function tearDown()