MINOR Don't fatally fail on DMSDoc->getAbsoluteSize() if doc doesn't exist on filesystem

Mainly to help with dev environments which aren't fully populated with live data
This commit is contained in:
Ingo Schommer 2012-10-15 01:01:44 +02:00
parent f2d81e26df
commit c5ea1b3dbd
1 changed files with 1 additions and 1 deletions

View File

@ -654,7 +654,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
* Return the size of the file associated with the document
*/
function getAbsoluteSize() {
return filesize($this->getFullPath());
return file_exists($this->getFullPath()) ? filesize($this->getFullPath()) : null;
}
/**