mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 03:09:58 +03:00
fixes #2254 adjust placement of int casting
...for SVG width and height values
This commit is contained in:
parent
29b1c32fbc
commit
65dce73ef8
1 changed files with 6 additions and 6 deletions
|
@ -188,24 +188,24 @@ function get_sync_metadata($infos)
|
|||
|
||||
$xmlget = simplexml_load_string($xml);
|
||||
$xmlattributes = $xmlget->attributes();
|
||||
$width = (int) $xmlattributes->width;
|
||||
$height = (int) $xmlattributes->height;
|
||||
$width = $xmlattributes->width;
|
||||
$height = $xmlattributes->height;
|
||||
$vb = (string) $xmlattributes->viewBox;
|
||||
|
||||
if (isset($width) and $width != "")
|
||||
{
|
||||
$infos['width'] = $width;
|
||||
$infos['width'] = (int) $width;
|
||||
} elseif (isset($vb))
|
||||
{
|
||||
$infos['width'] = explode(" ", $vb)[2];
|
||||
$infos['width'] = round(explode(" ", $vb)[2]);
|
||||
}
|
||||
|
||||
if (isset($height) and $height != "")
|
||||
{
|
||||
$infos['height'] = $height;
|
||||
$infos['height'] = (int) $height;
|
||||
} elseif (isset($vb))
|
||||
{
|
||||
$infos['height'] = explode(" ", $vb)[3];
|
||||
$infos['height'] = round(explode(" ", $vb)[3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue