@@ 168-175 (lines=8) @@ | ||
165 | ); |
|
166 | } |
|
167 | ||
168 | if ($this->accept && !$file->match($this->accept)) |
|
169 | { |
|
170 | $error_message = $errors->add( |
|
171 | File::HTTP_FILE, |
|
172 | "Only the following file types are accepted: %accepted.", |
|
173 | [ '%accepted' => implode(', ', $this->accept) |
|
174 | ]); |
|
175 | } |
|
176 | ||
177 | if ($error_message) |
|
178 | { |
@@ 104-112 (lines=9) @@ | ||
101 | ); |
|
102 | } |
|
103 | ||
104 | if (!$file->match($this->accept)) |
|
105 | { |
|
106 | $error_message = null; |
|
107 | $errors->add( |
|
108 | File::HTTP_FILE, |
|
109 | "Only the following file types are accepted: %accepted.", |
|
110 | [ '%accepted' => implode(', ', $this->accept) ] |
|
111 | ); |
|
112 | } |
|
113 | ||
114 | if ($error_message) |
|
115 | { |