This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ class Semantic_Linkbacks_Walker_Comment extends Walker_Comment {
1010
1111 protected static function should_facepile ( $ comment ) {
1212 $ facepiles = get_option ( 'semantic_linkbacks_facepiles ' , array_keys ( Linkbacks_Handler::get_comment_type_strings () ) );
13-
13+ // If getting the facepiles hasn't worked, create an empty array to avoid generating errors
14+ if ( ! is_array ( $ facepiles ) ) {
15+ $ facepiles = array ();
16+ }
17+
1418 if ( self ::is_reaction ( $ comment ) && in_array ( 'reaction ' , $ facepiles , true ) ) {
1519 return true ;
1620 }
Original file line number Diff line number Diff line change 1- <?php $ facepiles = get_option ( 'semantic_linkbacks_facepiles ' , array_keys ( Linkbacks_Handler::get_comment_type_strings () ) ); ?>
1+ <?php $ facepiles = get_option ( 'semantic_linkbacks_facepiles ' , array_keys ( Linkbacks_Handler::get_comment_type_strings () ) );
2+
3+ // If getting the facepiles hasn't worked, create an empty array to avoid generating errors
4+ if ( ! is_array ( $ facepiles ) ) {
5+ $ facepiles = array ();
6+ }
7+
8+ ?>
29<?php if ( in_array ( 'reacji ' , $ facepiles , true ) && Semantic_Linkbacks_Walker_Comment::$ reactions ) : ?>
310<div class="reactions">
411 <h3><?php echo __ ( 'Reacjis ' , 'semantic-linkbacks ' ); ?> </h3>
You can’t perform that action at this time.
0 commit comments