Skip to content

Commit

Permalink
Merge pull request #317 from eduardomozart/patch-3
Browse files Browse the repository at this point in the history
Fix DokuWiki Depreciation warning since DokuWiki 2020 Refactor
  • Loading branch information
Klap-in committed May 14, 2024
2 parents 2bb8e4e + f0a9fc4 commit 892ed10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ODT/ODTUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,12 @@ public static function getImageSize($src, $maxwidth=NULL, $maxheight=NULL){
$info = getimagesize($src);
} else {
// FIXME: Add cache support for downloaded images.
$fetch = (new DokuHTTPClient())->get($src);
if (class_exists('dokuwiki\HTTP\DokuHTTPClient')) {
$http = new dokuwiki\HTTP\DokuHTTPClient();
} else {
$http = new DokuHTTPClient();
}
$fetch = @$http->get($src);
if(!$fetch) {
return array(0, 0);
}
Expand Down

0 comments on commit 892ed10

Please sign in to comment.