mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: as title does not exist we fail validation without alt tags take at least the filename
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@74114 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
20a77500f3
commit
e799219724
@ -100,7 +100,7 @@ class Image extends File {
|
||||
function getTag() {
|
||||
if(file_exists("../" . $this->Filename)) {
|
||||
$url = $this->URL();
|
||||
$title = $this->Title;
|
||||
$title = ($this->Title) ? $this->Title : $this->Filename;
|
||||
return "<img src=\"$url\" alt=\"$title\" />";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user