"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).
This commit is contained in:
Ingo Schommer 2013-04-18 17:09:56 +02:00
parent 93a8e6f16e
commit 7f6671628d

View File

@ -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())
));
}