fix phpstan warnings in classes/api.php

This commit is contained in:
Andrew Dolgov 2021-11-13 17:51:26 +03:00
parent 77b8dc7386
commit a7983d475e
1 changed files with 4 additions and 4 deletions

View File

@ -356,7 +356,7 @@ class API extends Handler {
$article['content'] = Sanitizer::sanitize(
$entry->content,
self::_param_to_bool($entry->hide_images),
false, $entry->site_url, null, $entry->id);
null, $entry->site_url, null, $entry->id);
} else {
$article['content'] = $entry->content;
}
@ -485,9 +485,9 @@ class API extends Handler {
foreach ($article_ids as $id) {
if ($assign)
Labels::add_article($id, $label, $_SESSION["uid"]);
Labels::add_article((int)$id, $label, $_SESSION["uid"]);
else
Labels::remove_article($id, $label, $_SESSION["uid"]);
Labels::remove_article((int)$id, $label, $_SESSION["uid"]);
++$num_updated;
@ -756,7 +756,7 @@ class API extends Handler {
$headline_row["content"] = Sanitizer::sanitize(
$line["content"],
self::_param_to_bool($line['hide_images']),
false, $line["site_url"], null, $line["id"]);
null, $line["site_url"], null, $line["id"]);
} else {
$headline_row["content"] = $line["content"];
}