diff --git a/module/story/control.php b/module/story/control.php index 0e6a275007..11d75168ca 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -978,7 +978,7 @@ class story extends control $version = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch('version'); $files = $this->loadModel('file')->saveUpload($story->type, $storyID, $version); - if(empty($files) and $this->post->uid != '') $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]); + if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]); if($this->post->comment != '' or !empty($changes) or !empty($files)) { diff --git a/module/task/control.php b/module/task/control.php index 8608103802..132f3f5f71 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -465,7 +465,7 @@ class task extends control $changes = $this->task->update($taskID); if(dao::isError()) return print(js::error(dao::getError())); $files = $this->loadModel('file')->saveUpload('task', $taskID); - if(empty($files) and $this->post->uid != '') $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]); + if(empty($files) and $this->post->uid != '' and isset($_SESSION['album']['used'][$this->post->uid])) $files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]); } $task = $this->task->getById($taskID);