Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public static function prompt(string $field, $options = null, $validation = null
static::fwrite(STDOUT, $field . (trim($field) ? ' ' : '') . $extraOutput . ': ');

// Read the input from keyboard.
$input = trim(static::$io->input()) ?: $default;
$input = trim(static::$io->input()) ?: (string) $default;

if ($validation !== []) {
while (! static::validate('"' . trim($field) . '"', $input, $validation)) {
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Database/MigrateStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function run(array $params)
continue;
}

$date = date('Y-m-d H:i:s', $row->time);
$date = date('Y-m-d H:i:s', (int) $row->time);
$group = $row->group;
$batch = $row->batch;
// @codeCoverageIgnoreEnd
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Models/InsertModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function testInsertBatchSetsIntTimestamps(): void
$this->assertSame(2, $this->model->insertBatch($jobData));

$result = $this->model->where('name', 'Philosopher')->first();
$this->assertCloseEnough(time(), $result->created_at);
$this->assertCloseEnough(time(), (int) $result->created_at);
}

public function testInsertBatchSetsDatetimeTimestamps(): void
Expand Down