From da541bf273b69e64fab0a5476b0800941a1917b1 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 16 Sep 2023 03:35:56 +0300 Subject: [PATCH] fix magnetCommentIdParent data type as mixed --- src/crontab/export/feed.php | 2 +- src/library/valid.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crontab/export/feed.php b/src/crontab/export/feed.php index 947fec8..1fa5439 100644 --- a/src/crontab/export/feed.php +++ b/src/crontab/export/feed.php @@ -413,7 +413,7 @@ try $magnetComments[] = (object) [ 'magnetCommentId' => (int) $magnetComment->magnetCommentId, - 'magnetCommentIdParent' => (int) $magnetComment->magnetCommentIdParent, + 'magnetCommentIdParent' => $magnetComment->magnetCommentIdParent, 'userId' => (int) $magnetComment->userId, 'magnetId' => (int) $magnetComment->magnetId, 'timeAdded' => (int) $magnetComment->timeAdded, diff --git a/src/library/valid.php b/src/library/valid.php index 4143606..87b04aa 100644 --- a/src/library/valid.php +++ b/src/library/valid.php @@ -995,7 +995,7 @@ class Valid public static function magnetCommentIdParent(mixed $value, array &$error = []) : bool { - if (!(is_bool($value) || is_int($value))) + if (!(is_null($value) || is_int($value))) { array_push( $error,