Skip to content

Commit

Permalink
Fix embeded SVG rendering
Browse files Browse the repository at this point in the history
Fixes message "Error: Non-static method ODTImage::addStringAsSVGImage() cannot be called statically" on PHP 8.1 as can be seen in lpaulsen93#274
It's also used by other plug-ins like switchpanel - https://github.com/GreenItSolutions/dokuwiki-plugin-switchpanel/blob/561d049aef21afb3d54406d1b62373e8275ce766/syntax.php#L460
  • Loading branch information
eduardomozart committed May 10, 2023
1 parent 70dfada commit e56ff2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ODT/ODTImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static function addStringAsSVGImageFile(ODTDocument $doc, $string) {
* @param $title
* @param $style
*/
function addStringAsSVGImage(ODTInternalParams $params, $string, $width = NULL, $height = NULL, $align = NULL, $title = NULL, $style = NULL) {
public static function addStringAsSVGImage(ODTInternalParams $params, $string, $width = NULL, $height = NULL, $align = NULL, $title = NULL, $style = NULL) {
if ( empty($string) ) { return; }

$name = self::addStringAsSVGImageFile($params->document, $string);
Expand Down

0 comments on commit e56ff2e

Please sign in to comment.