Project

General

Profile

Patch #16319 » fix-crash.diff

Ebrahim Mohammadi, 2014-03-13 04:40

View differences:

lib/redmine/field_format.rb Fri Jan 24 10:29:06 2014 +0000 → lib/redmine/field_format.rb Thu Jan 30 21:10:09 2014 +0330
147 147

  
148 148
      def formatted_value(view, custom_field, value, customized=nil, html=false)
149 149
        casted = cast_value(custom_field, value, customized)
150
        if custom_field.url_pattern.present?
150
        if custom_field.respond_to?(:url_pattern) && custom_field.url_pattern.present?
151 151
          texts_and_urls = Array.wrap(casted).map do |single_value|
152 152
            text = view.format_object(single_value, false).to_s
153 153
            url = url_from_pattern(custom_field, single_value, customized)
(2-2/2)