From 8d94c7360142b98d698c05a9c2f9b9fc48d8594d Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Tue, 29 Mar 2016 15:48:05 -0500 Subject: [PATCH] forms: Fix attachments to file upload fields --- include/class.forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class.forms.php b/include/class.forms.php index 9fec2ec7d..661822005 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -2689,7 +2689,7 @@ class FileUploadField extends FormField { ) { $this->attachments = GenericAttachments::forIdAndType( // Combine the field and entry ids to make the key - sprintf('%u', crc32('E'.$this->get('id').$e->get('id'))), + sprintf('%u', abs(crc32('E'.$this->get('id').$e->get('id')))), 'E'); } return $this->attachments ?: array(); -- GitLab