Skip to content

Commit

Permalink
Merge 7c0b4b9 into 565ce24
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] committed Feb 5, 2023
2 parents 565ce24 + 7c0b4b9 commit 4a63f4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"nette/finder": "~2.5",
"nette/neon": "~3.0",
"phpstan/extension-installer": "1.2.0",
"phpstan/phpstan": "1.9.4",
"phpstan/phpstan": "1.9.14",
"phpstan/phpstan-deprecation-rules": "1.1.1",
"phpstan/phpstan-strict-rules": "1.4.4",
"symfony/config": "~4.4 || ~5.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Drivers/PdoPgsql/PdoPgsqlResultNormalizerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public function __construct()

$this->intervalNormalizer = static function($value): ?DateInterval {
if ($value === null) return null;
return DateInterval::createFromDateString($value);
$interval = DateInterval::createFromDateString($value);
return $interval !== false ? $interval : null;
};

$this->varBitNormalizer = static function($value) {
Expand Down
3 changes: 2 additions & 1 deletion src/Drivers/Pgsql/PgsqlResultNormalizerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public function __construct()

$this->intervalNormalizer = static function ($value): ?DateInterval {
if ($value === null) return null;
return DateInterval::createFromDateString($value);
$interval = DateInterval::createFromDateString($value);
return $interval !== false ? $interval : null;
};

$this->varBitNormalizer = static function ($value) {
Expand Down

0 comments on commit 4a63f4d

Please sign in to comment.