Skip to content

Commit 837570d

Browse files
committed
more effective check
1 parent 1b6dfc9 commit 837570d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/Handler/class-mf2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public function find_representative_item( $mf_array, $target ) {
431431
// check content for the link
432432
if (
433433
'content' === $obj_key &&
434-
isset( $obj_value['html'] ) &&
434+
! empty( $obj_value['html'] ) &&
435435
is_string( $obj_value['html'] ) &&
436436
preg_match_all( '/<a[^>]+?' . preg_quote( $target, '/' ) . '[^>]*>([^>]+?)<\/a>/i', $obj_value['html'], $context )
437437
) {
@@ -457,7 +457,7 @@ public function find_representative_item( $mf_array, $target ) {
457457
// check content for the link
458458
if (
459459
'content' === $key &&
460-
isset( $value['html'] ) &&
460+
! empty( $value['html'] ) &&
461461
is_string( $value['html'] ) &&
462462
preg_match_all( '/<a[^>]+?' . preg_quote( $target, '/' ) . '[^>]*>([^>]+?)<\/a>/i', $value['html'], $context )
463463
) {

0 commit comments

Comments
 (0)