Skip to content

Commit

Permalink
Fix upload image language
Browse files Browse the repository at this point in the history
  • Loading branch information
partydragen committed Aug 8, 2022
1 parent 38eb2fd commit fbbc44b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/includes/image_upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
!is_dir(join(DIRECTORY_SEPARATOR, [ROOT_PATH, 'uploads', 'profile_images', $user->data()->id]))
&& !mkdir(join(DIRECTORY_SEPARATOR, [ROOT_PATH, 'uploads', 'profile_images', $user->data()->id]))
) {
Session::flash('profile_banner_error', 'uploads/profile_images folder not writable! <a href="' . URL::build('/profile/' . Output::getClean($user->data()->username)) . '">Back</a>');
Session::flash('profile_banner_error', $language->get('admin', 'x_directory_not_writable', ['directory' => 'uploads/profile_images']));
Redirect::to(URL::build('/profile/' . urlencode($user->data()->username)));
}

Expand All @@ -111,7 +111,7 @@
try {
if (!$image->upload()) {
if (Input::get('type') === 'profile_banner') {
Session::flash('profile_banner_error', $image->getError());
Session::flash('profile_banner_error', $image->getError() ?: $language->get('api', 'unknown_error'));
Redirect::to(URL::build('/profile/' . urlencode($user->data()->username)));
}

Expand Down

0 comments on commit fbbc44b

Please sign in to comment.