mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-02-19 17:11:20 +01:00
Fix PHP warnings
This commit is contained in:
@@ -18,7 +18,7 @@ class markdown_editor extends rcube_plugin
|
||||
|
||||
if (isset($args['message']->headers)) {
|
||||
$draft_info = rcmail_sendmail::draftinfo_decode($args['message']->headers->get('x-draft-info'));
|
||||
$start_markdown_editor = $draft_info['markdown_editor'] === 'yes';
|
||||
$start_markdown_editor = ($draft_info['markdown_editor'] ?? '') === 'yes';
|
||||
}
|
||||
|
||||
$rcmail = rcube::get_instance();
|
||||
@@ -36,7 +36,7 @@ class markdown_editor extends rcube_plugin
|
||||
public function save_markdown_editor_usage($args)
|
||||
{
|
||||
if (isset($_POST['_markdown_editor']) && $_POST['_markdown_editor'] === '1') {
|
||||
$draft_info = rcmail_sendmail::draftinfo_decode($args['message']->headers()['X-Draft-Info']);
|
||||
$draft_info = rcmail_sendmail::draftinfo_decode($args['message']->headers()['X-Draft-Info'] ?? '');
|
||||
$draft_info['markdown_editor'] = 'yes';
|
||||
$args['message']->headers(['X-Draft-Info' => rcmail_sendmail::draftinfo_encode($draft_info)], true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user