Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » form error DBField.php

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

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

Page: 1
Go to End
Author Topic: 649 Views
  • mhull
    Avatar
    Community Member
    79 Posts

    form error DBField.php Link to this post

    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:

    Source
    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    }   
    112    
    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:
    http://silverstripe.org/all-other-modules/show/258498#post258498

    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?

    649 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.