From 8cae5d8da1d7d45d30c95c12203e2b0df7400e77 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 26 Mar 2016 21:08:16 -0400 Subject: Fix PHP 5.3 issue --- app/Model/User.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Model/User.php b/app/Model/User.php index b093d55f..57993002 100644 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -320,10 +320,9 @@ class User extends Base */ public function remove($user_id) { - return $this->db->transaction(function (Database $db) use ($user_id) { + $this->avatarFile->remove($user_id); - // Remove Avatar - $this->avatarFile->remove($user_id); + return $this->db->transaction(function (Database $db) use ($user_id) { // All assigned tasks are now unassigned (no foreign key) if (! $db->table(Task::TABLE)->eq('owner_id', $user_id)->update(array('owner_id' => 0))) { -- cgit v1.2.3