Skip to content

Commit

Permalink
fix ext extraction on submit
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Henrique Lelis de Almeida committed Sep 8, 2024
1 parent 5680c41 commit 8f68e82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/Model/Archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ public function getAwsFileContent($key, $bucket = null)
// This is not the ideal solution, but it is not worth to change the whole
// behaviour of the commits upload for now. (Will be rewritten soon).
private function extractExtension($fileName) {
$split = explode(".", $upload['name'][$index]);
$split = explode(".", $fileName);

if (count($split) == 1) {
return $split[0];
Expand Down
4 changes: 3 additions & 1 deletion src/app/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ public function beforeSave($options = array())
if (isset($this->data[$this->alias]['password'])) {
$this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']);
}
$this->data[$this->alias]['email'] = strtolower($this->data[$this->alias]['email']);
if (array_key_exists('email', $this->data[$this->alias])) {
$this->data[$this->alias]['email'] = strtolower($this->data[$this->alias]['email']);
}
return true;
}
public function afterFind($results, $primary = false)
Expand Down

0 comments on commit 8f68e82

Please sign in to comment.