Skip to content

Commit 1f33a58

Browse files
committed
Degreasing correction
1 parent 4f56468 commit 1f33a58

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ParsedContent.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public static function getDeprecated($post_id = null) {
514514

515515
$deprecated = wp_filter_object_list($tags, ['name' => 'deprecated']);
516516

517-
if (empty($deprecated) || !isset($deprecated['content'])) {
517+
if (empty($deprecated)) {
518518
return [
519519
'content' => '',
520520
'description' => '',
@@ -523,6 +523,13 @@ public static function getDeprecated($post_id = null) {
523523

524524
$deprecated = array_shift($deprecated);
525525

526+
if (!isset($deprecated['content'])) {
527+
return [
528+
'content' => '',
529+
'description' => '',
530+
];
531+
}
532+
526533
return [
527534
'content' => htmlspecialchars($deprecated['content']),
528535
'description' => htmlspecialchars(isset($deprecated['description']) ? $deprecated['description'] : ''),

0 commit comments

Comments
 (0)