diff options
author | Andrew Dolgov <[email protected]> | 2021-02-28 10:13:17 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-28 10:13:17 +0300 |
commit | 77d1dc07824440c7894515d95f0790eec7555d9d (patch) | |
tree | 706f3b5ac020af477196f6a4aca78c2d6fd6bd6c | |
parent | f999a5df1c85678ce70c5c7c9f82565aade52229 (diff) |
updates for core changes
-rw-r--r-- | init.php | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -174,10 +174,6 @@ class Api_Resize_Media extends Plugin { } } } else { - global $fetch_last_error; - global $fetch_last_error_code; - global $fetch_last_error_content; - if (function_exists("imagecreate") && !isset($_REQUEST["text"])) { $img = imagecreate(450, 75); @@ -188,7 +184,7 @@ class Api_Resize_Media extends Plugin { imagestring($img, 5, 5, 5, "Proxy request failed", $textcolor); imagestring($img, 5, 5, 30, truncate_middle($url, 46, "..."), $textcolor); - imagestring($img, 5, 5, 55, "HTTP Code: $fetch_last_error_code", $textcolor); + imagestring($img, 5, 5, 55, "HTTP Code: ".UrlHelper::$fetch_last_error_code, $textcolor); header("Content-type: image/png"); print imagepng($img); @@ -200,7 +196,7 @@ class Api_Resize_Media extends Plugin { http_response_code(400); print "Proxy request failed.\n". - "Fetch error $fetch_last_error ($fetch_last_error_code)\n". + "Fetch error ".UrlHelper::$fetch_last_error." (".UrlHelper::$fetch_last_error_code.")\n". "Requested URL: $url"; } } |