diff --git a/src/bp-core/bp-core-avatars.php b/src/bp-core/bp-core-avatars.php
index 29d62d720..8c7fec7fa 100644
--- a/src/bp-core/bp-core-avatars.php
+++ b/src/bp-core/bp-core-avatars.php
@@ -710,6 +710,7 @@ function bp_core_fetch_avatar( $args = '' ) {
  * @return bool True on success, false on failure.
  */
 function bp_core_delete_existing_avatar( $args = '' ) {
+	global $current_blog;
 
 	$defaults = array(
 		'item_id'    => false,
