aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggFile.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2013-05-30 16:13:58 -0700
committerCash Costello <cash.costello@gmail.com>2013-05-30 16:13:58 -0700
commit2151c77194a2ac0a8bb85a7c5800d8af81452d62 (patch)
tree4ace3e86100a2a4b37a076a99749dd5b6bb7a615 /engine/classes/ElggFile.php
parentb980c75fdf5c1fecb267b8984f9ec363c1ae5658 (diff)
parentd90ddd2f9be750d3bf827679f49943166b486ad4 (diff)
downloadelgg-2151c77194a2ac0a8bb85a7c5800d8af81452d62.tar.gz
elgg-2151c77194a2ac0a8bb85a7c5800d8af81452d62.tar.bz2
Merge pull request #5563 from jeabakker/better-result-for-elggfile-delete
ElggFile->delete() can return false on success or null on failure
Diffstat (limited to 'engine/classes/ElggFile.php')
-rw-r--r--engine/classes/ElggFile.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/classes/ElggFile.php b/engine/classes/ElggFile.php
index 3e9c24c17..23080834b 100644
--- a/engine/classes/ElggFile.php
+++ b/engine/classes/ElggFile.php
@@ -275,9 +275,14 @@ class ElggFile extends ElggObject {
*/
public function delete() {
$fs = $this->getFilestore();
- if ($fs->delete($this)) {
- return parent::delete();
+
+ $result = $fs->delete($this);
+
+ if ($this->getGUID() && $result) {
+ $result = parent::delete();
}
+
+ return $result;
}
/**