Skip to content

Commit 6196580

Browse files
author
Sebastian Thulin
committed
fix: cast string post id to int.
1 parent e66b068 commit 6196580

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/php/BrokenLinkRegistry/Link/Link.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ public function classify(): Classify
6464
*/
6565
public static function createLink(string $url, ?int $httpCode, null|string|int $postId, WpService $wpService, Config $config): Link
6666
{
67+
if (is_string($postId)) {
68+
$postId = (int)$postId;
69+
}
6770
self::$wpService = $wpService;
6871
self::$config = $config;
6972
return new Link($url, $httpCode, $postId);

0 commit comments

Comments
 (0)