From 066ea94b1169b529f8309de14f696444206e67dd Mon Sep 17 00:00:00 2001 From: Oliver Tacke Date: Fri, 26 Oct 2018 09:35:24 +0200 Subject: [PATCH 1/2] Fix warning in toDBArray() Prevent accessing keys of metadata that don't exist --- h5p-metadata.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5p-metadata.class.php b/h5p-metadata.class.php index 6884e0e..80d8eff 100644 --- a/h5p-metadata.class.php +++ b/h5p-metadata.class.php @@ -85,7 +85,7 @@ abstract class H5PMetadata { continue; } - if ($metadata[$key] === null || isset($metadata[$key])) { + if (array_key_exists($key, $metadata) && ($metadata[$key] === null || isset($metadata[$key]))) { $value = $metadata[$key]; $db_field_name = strtolower(preg_replace('/(? Date: Fri, 16 Nov 2018 12:39:57 +0100 Subject: [PATCH 2/2] JI-915 Fix embed resizing issue with Chrome --- js/h5p-resizer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/h5p-resizer.js b/js/h5p-resizer.js index 4ed65e0..ed78724 100644 --- a/js/h5p-resizer.js +++ b/js/h5p-resizer.js @@ -20,6 +20,10 @@ // Make iframe responsive iframe.style.width = '100%'; + // Bugfix for Chrome: Force update of iframe width. If this is not done the + // document size may not be updated before the content resizes. + iframe.getBoundingClientRect(); + // Tell iframe that it needs to resize when our window resizes var resize = function () { if (iframe.contentWindow) {