Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

form error DBField.php

Go to End



Community Member, 79 Posts

4 September 2009 at 10:29pm

Where would I find the trunk for 2.3.1 version?
When I have a file upload field in a form on SS 2.3.1, I am experiencing this error:

100 	 * this should include quotes.
101 	 * 
102 	 * @param $value mixed The value to check
103 	 * @return string The encoded value
104 	 */
105 	function prepValueForDB($value) {
106 		if($value === null || $value === "" || $value === false) {
107 			return "null";
108 		} else {
109 			return "'" . addslashes($value) . "'";
110 		}
111 	}	
113 	/**
114 	 * Prepare the current field for usage in a 
115 	 * database-manipulation (works on a manipulation reference).

I have come across this post regarding the same issue:

Can anyone point me to the replacement DBField.php file that may solve the problem? Where would I find the trunk for 2.3.1 version? Or is there another answer?