diff options
author | Andrew Dolgov <[email protected]> | 2021-02-15 08:18:13 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-15 08:18:13 +0300 |
commit | c73615343eadc5c4d4f9b3bfddd9517a51c70fa3 (patch) | |
tree | 16445bcb784d3a9085d1a7aa29d6e7f94388f60a | |
parent | 621e063baf9a49cfcf69c78c032eb6b46435b1c9 (diff) |
fix php8 warning
-rw-r--r-- | init.php | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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); } |