aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index 70b2fa5f0..9e3e97d1a 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -432,9 +432,10 @@ HTML;
}
}
public function _guid(string $value): void {
- if ($value == '') {
+ $value = trim($value);
+ if (empty($value)) {
$value = $this->link;
- if ($value == '') {
+ if (empty($value)) {
$value = $this->hash();
}
}
@@ -468,7 +469,7 @@ HTML;
}
public function _link(string $value): void {
$this->hash = '';
- $this->link = $value;
+ $this->link = trim($value);
}
/** @param int|string $value */
public function _date($value): void {