summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-15 08:18:13 +0300
committerAndrew Dolgov <[email protected]>2021-02-15 08:18:13 +0300
commitc73615343eadc5c4d4f9b3bfddd9517a51c70fa3 (patch)
tree16445bcb784d3a9085d1a7aa29d6e7f94388f60a
parent621e063baf9a49cfcf69c78c032eb6b46435b1c9 (diff)
fix php8 warning
-rw-r--r--init.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/init.php b/init.php
index a60537f..5db5b0d 100644
--- a/init.php
+++ b/init.php
@@ -105,7 +105,6 @@ class Api_Resize_Media extends Plugin {
}
}
- /** @noinspection PhpUnused */
public function api_resize() {
$url = validate_url($_REQUEST["url"]);
@@ -304,7 +303,6 @@ class Api_Resize_Media extends Plugin {
return $article;
}
- /** @noinspection PhpUnused */
function hook_article_image($enclosures, $content, $site_url) {
$width = (int) clean($_REQUEST["resize_width"] ?? 0);
@@ -313,7 +311,6 @@ class Api_Resize_Media extends Plugin {
return ["", "", $article["content"]];
}
- /** @noinspection PhpUnused */
function hook_enclosure_entry($enc) {
$force_width = (int) $this->host->get($this, "force_width", 0);
@@ -322,23 +319,20 @@ class Api_Resize_Media extends Plugin {
return $enc;
}
- /** @noinspection PhpUnused */
function hook_render_article_cdm($row) {
$force_width = (int) $this->host->get($this, "force_width", 0);
return $this->process_article(["article" => $row], $force_width);
}
- /** @noinspection PhpUnused */
function hook_render_article($row) {
$force_width = (int) $this->host->get($this, "force_width", 0);
return $this->process_article(["article" => $row], $force_width);
}
- /** @noinspection PhpUnused */
function hook_render_article_api($row) {
- $width = (int) clean($_REQUEST["resize_width"]);
+ $width = (int) clean($_REQUEST["resize_width"] ?? 0);
return $this->process_article($row, $width);
}