From 7f6671628d4788c76784f5b265aabddb7e560690 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 18 Apr 2013 17:09:56 +0200 Subject: [PATCH] "UploadFieldFileButtons" casting (regression from casting changes) Caused the UploadField rows to show "[Object object]" because it tried to pass through a PHP object to JS without string casting (the return used to be a string). --- forms/UploadField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/UploadField.php b/forms/UploadField.php index ca2dc2067..a05dfc28e 100644 --- a/forms/UploadField.php +++ b/forms/UploadField.php @@ -281,7 +281,7 @@ class UploadField extends FileField { )); // we do this in a second customise to have the access to the previous customisations return $file->customise(array( - 'UploadFieldFileButtons' => $file->renderWith($this->getTemplateFileButtons()) + 'UploadFieldFileButtons' => (string)$file->renderWith($this->getTemplateFileButtons()) )); }