Skip to content

Commit

Permalink
chore:PHP warning by adding a check for the existence of the 'link' k…
Browse files Browse the repository at this point in the history
…ey in the social profiles widget
  • Loading branch information
yssambare12 committed Oct 2, 2024
1 parent 225db34 commit fbbcb0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/widgets/class-astra-widget-social-profiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public function widget( $args, $instance ) {
$trimmed = str_replace( 'astra-icon-', '', $list['icon'] );
?>
<li>
<a href="<?php echo esc_attr( $list['link'] ); ?>" target="<?php echo esc_attr( $target ); ?>" rel="<?php echo esc_attr( $rel ); ?>" aria-label="<?php echo ( is_object( $list_data ) ) ? esc_html( $list_data->name ) : ''; ?>">
<a href="<?php echo isset( $list['link'] ) ? esc_attr( $list['link'] ) : '#'; ?>" target="<?php echo esc_attr( $target ); ?>" rel="<?php echo esc_attr( $rel ); ?>" aria-label="<?php echo ( is_object( $list_data ) ) ? esc_html( $list_data->name ) : ''; ?>">
<span class="ast-widget-icon <?php echo ( is_object( $list_data ) ) ? esc_html( $list_data->name ) : ''; ?>">
<?php if ( ! empty( $list_data->viewbox ) && ! empty( $list_data->path ) ) { ?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="<?php echo ( isset( $list_data->viewbox ) ) ? esc_attr( $list_data->viewbox ) : ''; ?>" width="<?php echo esc_attr( $icon_width ); ?>" height="<?php echo esc_attr( $icon_width ); ?>"><path d="<?php echo ( isset( $list_data->path ) ) ? esc_attr( $list_data->path ) : ''; ?>"></path></svg>
Expand Down

0 comments on commit fbbcb0e

Please sign in to comment.