File tree Expand file tree Collapse file tree 2 files changed +42
-4
lines changed Expand file tree Collapse file tree 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.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
55and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
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+
737## 3.0.3 - 2018-07-24
838
939** Fixed**
Original file line number Diff line number Diff line change @@ -218,9 +218,13 @@ public function mailable(Mailable $mailable)
218218 */
219219 public function attach ($ file , $ options = [])
220220 {
221- $ attachments = $ this -> hasData ( ' attachments ' ) ? $ this -> getData ( ' attachments ' ) : [] ;
221+ $ attachments = null ;
222222
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+ }
224228
225229 return $ this ->setData ('attachments ' , $ attachments );
226230 }
@@ -235,9 +239,13 @@ public function attach($file, $options = [])
235239 */
236240 public function attachData ($ data , $ name , array $ options = [])
237241 {
238- $ attachments = $ this -> hasData ( ' rawAttachments ' ) ? $ this -> getData ( ' rawAttachments ' ) : [] ;
242+ $ attachments = null ;
239243
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+ }
241249
242250 return $ this ->setData ('rawAttachments ' , $ attachments );
243251 }
You can’t perform that action at this time.
0 commit comments