From 5abbe95a0b51dd9af78dd55f53cf6f5888425331 Mon Sep 17 00:00:00 2001 From: Atanas Angelov Date: Sat, 1 Dec 2018 00:17:53 +0200 Subject: [PATCH] Fix various minor issues --- src/Avatar/Avatar.php | 4 +++- src/Theme/Theme.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Avatar/Avatar.php b/src/Avatar/Avatar.php index b286523..c2385f6 100644 --- a/src/Avatar/Avatar.php +++ b/src/Avatar/Avatar.php @@ -2,6 +2,8 @@ namespace WPEmergeTheme\Avatar; +use WP_Comment; + class Avatar { /** * Default avatar attachment id. @@ -161,7 +163,7 @@ public function filterAvatar( $url, $id_or_email, $args ) { $id = $this->idOrEmailToId( $id_or_email ); if ( is_numeric( $id ) ) { - $filtered_url = $this->getAvatarUrl( $id, $this->getSize( $args ) ); + $filtered_url = $this->getAvatarUrl( (int) $id, $this->getSize( $args ) ); if ( $filtered_url !== null ) { $url = $filtered_url; } diff --git a/src/Theme/Theme.php b/src/Theme/Theme.php index 692fed4..83ed990 100644 --- a/src/Theme/Theme.php +++ b/src/Theme/Theme.php @@ -2,6 +2,7 @@ namespace WPEmergeTheme\Theme; +use Exception; use WPEmerge; use WPEmerge\Facades\Framework; use WPEmergeTheme\Assets\AssetsServiceProvider;