Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 53dc5f6

Browse files
committed
Check that title is set and not empty when trimmed
1 parent c03ede6 commit 53dc5f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

widgets/creativecommons-widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function widget( $args, $instance ) {
8585
* To prevent rendering an empty heading tag (and related margin)
8686
* only render title when it exists (and isn't an empty string)
8787
*/
88-
$title_exists = $title && $title != "";
88+
$title_exists = isset($title) && !empty(trim($title));
8989

9090
if ($title_exists) {
9191
echo $args['before_title'] . $title . $args['after_title'];

0 commit comments

Comments
 (0)