Skip to content

Commit

Permalink
Merge pull request #1211 from daniel89fg/Tarea_#769_limitar_5000_char…
Browse files Browse the repository at this point in the history
…s_emails_model

Limitar a 5000 caracteres el body de los emails al guardar en la BD.
  • Loading branch information
NeoRazorX committed May 30, 2022
2 parents 1495ba5 + 7eebb16 commit 8057d1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Core/Model/EmailSent.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public static function tableName(): string
public function test(): bool
{
$utils = $this->toolBox()->utils();
$this->body = $utils->noHtml($this->body);
$body = $utils->noHtml($this->body);
$this->body = strlen($body) > 5000 ? substr($body, 0, 5000) : $body;
$this->subject = $utils->noHtml($this->subject);
return parent::test();
}
Expand Down

0 comments on commit 8057d1f

Please sign in to comment.