Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit fc4b782

Browse files
authored
Prevent Facepile error
Fixes #196
1 parent 88bc8f9 commit fc4b782

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

templates/linkbacks.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
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>

0 commit comments

Comments
 (0)