Index: trunk/extensions/SocialProfile/SystemGifts/UserSystemGiftsClass.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | //add to new gift count cache for receiving user |
48 | 48 | $this->incNewSystemGiftCount($this->user_id); |
49 | 49 | |
50 | | - if( $email ) $this->sendGiftNotificationEmail( $this->user_id, $gift_id ); |
| 50 | + if( $email && !empty( $sg_gift_id ) ) $this->sendGiftNotificationEmail( $this->user_id, $gift_id ); |
51 | 51 | $wgMemc->delete( wfMemcKey( 'user', 'profile', 'system_gifts', $this->user_id ) ); |
52 | 52 | return $sg_gift_id; |
53 | 53 | } |