Skip to content

Commit

Permalink
Proper empty checks for the_folder() method in Folders.php.
Browse files Browse the repository at this point in the history
See #1167.
  • Loading branch information
boonebgorges committed Sep 14, 2023
1 parent 3a338ed commit caeec4d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Core/Schema/Folders.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,12 @@ public function the_inside_of_folder( $folder, $wrapped = false ) {
* @param array $folder Term data.
*/
public function the_folder( $folder ) {
if ( is_array( $folder ) ) {
$term_obj = $folder['term'];
} else {
$term_obj = $folder;
if ( empty( $folder['term'] ) ) {
return;
}

$term_obj = $folder['term'];

?>

<?php
Expand Down

0 comments on commit caeec4d

Please sign in to comment.