Skip to content

Commit 8e95709

Browse files
committed
Attachment ID can return an empty value #318
1 parent 5415d52 commit 8e95709

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
66

77
## [UNRELEASED]
88
### Fixed
9-
- NaN
10-
-
9+
- Attachment ID can return an empty value #318
10+
1111
### Added
1212
- NaN
1313

src/Attachment.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ protected function fetch() {
213213

214214
if (($id = $this->part->id) !== null) {
215215
$this->id = str_replace(['<', '>'], '', $id);
216+
}else{
217+
$this->id = hash("sha256", (string)microtime(true));
216218
}
217219

218220
$this->size = $this->part->bytes;

0 commit comments

Comments
 (0)