Commit 01b541d8 authored by Zot's avatar Zot Committed by Mario
Browse files

oembed: ensure that width and height are returned as type int and not float

parent 928fce87
......@@ -108,7 +108,7 @@ class Oep extends \Zotlabs\Web\Controller {
$ret['type'] = 'rich';
$w = (($maxwidth) ? $maxwidth : 640);
$h = (($maxheight) ? $maxheight : $w * 2 / 3);
$h = (($maxheight) ? $maxheight : intval($w * 2 / 3));
$ret['html'] = '<div style="width: ' . $w . '; height: ' . $h . '; font-family: sans-serif,arial,freesans;" >' . $o . '</div>';
......@@ -167,7 +167,7 @@ class Oep extends \Zotlabs\Web\Controller {
$ret['type'] = 'rich';
$w = (($maxwidth) ? $maxwidth : 640);
$h = (($maxheight) ? $maxheight : $w * 2 / 3);
$h = (($maxheight) ? $maxheight : intval($w * 2 / 3));
$ret['html'] = '<div style="width: ' . $w . '; height: ' . $h . '; font-family: sans-serif,arial,freesans;" >' . $o . '</div>';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment