--- filepicker.php.original 2011-09-26 13:38:30.201432733 +0200 +++ filepicker.php 2011-09-26 13:56:12.654500468 +0200 @@ -115,7 +115,7 @@ function exportValue(&$submitValues, $assoc = false) { global $USER; - $draftitemid = $this->_findValue($submitValues); + $draftitemid = (int)$this->_findValue($submitValues); if (null === $draftitemid) { $draftitemid = $this->getValue(); }