From 8b11599917048ca485f2e815143e9472c00eceae Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 02:33:30 +0000 Subject: [PATCH] BUGFIX Ensuring ParentID is numeric in File->setParentID() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92562 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- filesystem/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/File.php b/filesystem/File.php index 2201b172f..ee7db78a2 100755 --- a/filesystem/File.php +++ b/filesystem/File.php @@ -389,7 +389,7 @@ class File extends DataObject { } function setParentID($parentID) { - $this->setField('ParentID', $parentID); + $this->setField('ParentID', (int)$parentID); if($this->Name) $this->resetFilename(); else $this->autosetFilename();