summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-08-19 10:02:38 +0300
committerAndrew Dolgov <[email protected]>2020-08-19 10:02:38 +0300
commit048f5071383815be3b426784a7182aaa7e94138b (patch)
treebd68a24ae3478d681b73222e06e7cbfc07e9a436
parentf4253918a8233ab1920bbccad138553f3392754e (diff)
fix for headline image error 500
-rw-r--r--init.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.php b/init.php
index 211e7dd..7a05506 100644
--- a/init.php
+++ b/init.php
@@ -312,7 +312,9 @@ class Api_Resize_Media extends Plugin {
/** @noinspection PhpUnused */
function hook_article_image($enclosures, $content, $site_url) {
- $article = $this->process_article(["headline" => ["content" => $content]]);
+ $width = (int) clean($_REQUEST["resize_width"]);
+
+ $article = $this->process_article(["headline" => ["content" => $content]], $width);
return ["", "", $article["content"]];
}