Browse Source

fix magnetCommentIdParent data type as mixed

main
ghost 1 year ago
parent
commit
da541bf273
  1. 2
      src/crontab/export/feed.php
  2. 2
      src/library/valid.php

2
src/crontab/export/feed.php

@ -413,7 +413,7 @@ try @@ -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,

2
src/library/valid.php

@ -995,7 +995,7 @@ class Valid @@ -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,

Loading…
Cancel
Save