We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
Linking a SVG image in markdown is not working:
[![](image.svg)](https/external/link)
This lead to an error:
/config/www/user/plugins/external_links/classes/ExternalLinks.php Arguments "Trying to access array offset on value of type bool"
Code (line 294):
$width = 0; $height = 0; // Determine image dimensions based on "src" atrribute if ($imgNode->hasAttribute('src')) { $src = $imgNode->getAttribute('src'); // Simple check if the URL is internal i.e. check if path exists $path = $_SERVER['DOCUMENT_ROOT'] . $src; if (realpath($path) && is_file($path)) { $size = @getimagesize($path); } else { // The URL is external; try to load it (default: 32 KB) $size = $this->getRemoteImageSize($src, $limit * 1024); } } // Read out width and height from <img> attributes $width = $imgNode->hasAttribute('width') ? $imgNode->getAttribute('width') : $size[0]; <<<<<<<<<<<<<<<<<< ERROR $height = $imgNode->hasAttribute('height') ? $imgNode->getAttribute('height') : $size[1]; // Get width and height from style attribute if ( $imgNode->hasAttribute('style') ) { $style = $imgNode->getAttribute('style'); // Width if (preg_match('~width:\s*(\d+)([a-z]+)~i', $style, $matches)) { $width = $matches[1]; // Convert unit to pixel if ( isset($units[$matches[2]]) ) { $width *= $units[$matches[2]]; } } // Height if (preg_match('~height:\s*(\d+)([a-z]+)~i', $style, $matches)) { $height = $matches[1]; // Convert unit to pixel
Kind regards
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
Linking a SVG image in markdown is not working:
This lead to an error:
Code (line 294):
Kind regards
The text was updated successfully, but these errors were encountered: