From: Matthias Schmidt Date: Wed, 17 Oct 2018 17:01:48 +0000 (+0200) Subject: Fix saving new media providers without `html` via GUI X-Git-Tag: 5.2.0_Alpha_1~616 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a31f1af37672216aa01f451ad20749d732cb40b6;p=GitHub%2FWoltLab%2FWCF.git Fix saving new media providers without `html` via GUI See #2545 --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php index 77bea3bbc1..46ee6dbf1c 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php @@ -193,6 +193,10 @@ class MediaProviderPackageInstallationPlugin extends AbstractXMLPackageInstallat if ($html !== null) { $data['html'] = $html->nodeValue; } + else if ($saveData) { + // when saving data, `html` has to be present + $data['html'] = ''; + } $className = $element->getElementsByTagName('className')->item(0); if ($className !== null) {