File tree 2 files changed +42
-4
lines changed
2 files changed +42
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,36 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
5
5
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## 4.0.2 - 2019-01-01
8
+
9
+ ** Fixed**
10
+
11
+ - Fixed regression bug (testing mode)
12
+
13
+ ## 4.0.1 - 2018-12-31
14
+
15
+ ** Added**
16
+
17
+ - New environment variable ` LARAVEL_DATABASE_EMAILS_TESTING_ENABLED ` to indicate if testing mode is enabled (* )
18
+
19
+ ** Fixed**
20
+
21
+ - Fixed issue where Mailables would not be read correctly
22
+ - Config file was not cachable (* )
23
+
24
+ (* ) = To be able to cache the config file, change the 'testing' closure to the environment variable as per ` laravel-database-emails.php ` config file.
25
+
26
+ ## 4.0.0 - 2018-09-15
27
+
28
+ ** Changed**
29
+
30
+ - Changed package namespace
31
+
32
+ ** Removed**
33
+
34
+ - Removed resend/retry option entirely
35
+ - Removed process time limit
36
+
7
37
## 3.0.3 - 2018-07-24
8
38
9
39
** Fixed**
Original file line number Diff line number Diff line change @@ -218,9 +218,13 @@ public function mailable(Mailable $mailable)
218
218
*/
219
219
public function attach ($ file , $ options = [])
220
220
{
221
- $ attachments = $ this -> hasData ( ' attachments ' ) ? $ this -> getData ( ' attachments ' ) : [] ;
221
+ $ attachments = null ;
222
222
223
- $ attachments [] = compact ('file ' , 'options ' );
223
+ if (! empty ($ file ) || ! is_null ($ file )) {
224
+ $ attachments = $ this ->hasData ('attachments ' ) ? $ this ->getData ('attachments ' ) : [];
225
+
226
+ $ attachments [] = compact ('file ' , 'options ' );
227
+ }
224
228
225
229
return $ this ->setData ('attachments ' , $ attachments );
226
230
}
@@ -235,9 +239,13 @@ public function attach($file, $options = [])
235
239
*/
236
240
public function attachData ($ data , $ name , array $ options = [])
237
241
{
238
- $ attachments = $ this -> hasData ( ' rawAttachments ' ) ? $ this -> getData ( ' rawAttachments ' ) : [] ;
242
+ $ attachments = null ;
239
243
240
- $ attachments [] = compact ('data ' , 'name ' , 'options ' );
244
+ if (! empty ($ data ) || ! is_null ($ data )) {
245
+ $ attachments = $ this ->hasData ('rawAttachments ' ) ? $ this ->getData ('rawAttachments ' ) : [];
246
+
247
+ $ attachments [] = compact ('data ' , 'name ' , 'options ' );
248
+ }
241
249
242
250
return $ this ->setData ('rawAttachments ' , $ attachments );
243
251
}
You can’t perform that action at this time.
0 commit comments