Skip to content

Commit

Permalink
fix: [authkey:add] Make sure to default to expiration=0 if not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
mokaddem committed May 23, 2024
1 parent d617c57 commit 761e5e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Table/AuthKeysTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function initialize(array $config): void
public function beforeMarshal(EventInterface $event, ArrayObject $data, ArrayObject $options)
{
$data['created'] = time();
if (!isset($data['expiration'])) {
if (!isset($data['expiration']) || empty($data['expiration'])) {
$data['expiration'] = 0;
} else {
$data['expiration'] = strtotime($data['expiration']);
Expand Down

0 comments on commit 761e5e9

Please sign in to comment.