Commit c4c0b0fb authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

report error in logs when template has not empty first line

  and it doesn't look like header. As well add that empty line

git-svn-id: svn+ssh:// e417ac7c-1bcc-0310-8ffa-8f5827389a85
parent 73afc53d
......@@ -303,6 +303,16 @@ sub Parse {
my ($content, $msg) = $self->_ParseContent(@_);
return ( 0, $msg ) unless defined $content && length $content;
if ( $content =~ /^\S/s && $content !~ /^\S+:/ ) {
"Template #". $self->id ." has leading line that doesn't"
." look like header field, if you don't want to override"
." any headers and don't want to see this error message"
." then leave first line of the template empty"
$content = "\n".$content;
#Lets build our mime Entity
my $parser = MIME::Parser->new();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment