Using File->setTitle in oEmbed

This commit is contained in:
Mikael Nordfeldth 2016-07-23 21:01:28 +02:00
parent d84bf83419
commit 563b3b1328

View File

@ -174,7 +174,9 @@ class OembedPlugin extends Plugin
if ($oembed_data === false) { if ($oembed_data === false) {
throw new Exception('Did not get oEmbed data from URL'); throw new Exception('Did not get oEmbed data from URL');
} }
$file->setTitle($oembed_data->title);
} catch (Exception $e) { } catch (Exception $e) {
common_log(LOG_WARN, sprintf(__METHOD__.': %s thrown when getting oEmbed data: %s', get_class($e), _ve($e->getMessage())));
return true; return true;
} }