mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #3916 bribaudo: Don't throw an error on HTMLEditorField save if a link is empty.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78563 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
710bb89396
commit
8cf4986397
@ -60,7 +60,7 @@ class HtmlEditorField extends TextareaField {
|
||||
// Prevents execution timeouts if a page has 50 identical broken links by only highlighting them once
|
||||
$alreadyHighlighted[$parts[1]] = true;
|
||||
}
|
||||
} else if($link[0] == '/') {
|
||||
} else if($link == '' || $link[0] == '/') {
|
||||
$broken = true;
|
||||
} else if(ereg('^assets/',$link)) {
|
||||
$link = str_replace(array('%20', '%5C', '%27'), array(' ', '\\', '\''), $link);
|
||||
@ -137,7 +137,7 @@ class HtmlEditorField extends TextareaField {
|
||||
$record->HasBrokenLink = 1;
|
||||
}
|
||||
|
||||
} else if($link{0} == '/') {
|
||||
} else if($link == '' || $link[0] == '/') {
|
||||
$record->HasBrokenLink = 1;
|
||||
|
||||
} else if($candidateFile = DataObject::get_one("File", "\"Filename\" = '" . Convert::raw2sql(urldecode($link)) . "'", false)) {
|
||||
|
Loading…
Reference in New Issue
Block a user