Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'undefined' and 'null' being returned by the frontend #959

Merged
merged 3 commits into from Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,12 @@

All notable changes to `twill` will be documented in this file.

## 2.3.1 (2021-06-05)

### Fixed

- Media library upload regressions (hotfix) [#959](https://github.com/area17/twill/pull/959)

## 2.3.0 (2021-06-03)

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/Admin/FileLibraryController.php
Expand Up @@ -315,6 +315,6 @@ public function uploadIsNotValid()
*/
private function shouldReplaceFile($id)
{
return isset($id) ? $this->repository->whereId($id)->exists() : false;
return is_numeric($id) ? $this->repository->whereId($id)->exists() : false;
}
}
2 changes: 1 addition & 1 deletion src/Http/Controllers/Admin/MediaLibraryController.php
Expand Up @@ -339,6 +339,6 @@ private function getExtraMetadatas()
*/
private function shouldReplaceMedia($id)
{
return isset($id) ? $this->repository->whereId($id)->exists() : false;
return is_numeric($id) ? $this->repository->whereId($id)->exists() : false;
}
}
2 changes: 1 addition & 1 deletion src/TwillServiceProvider.php
Expand Up @@ -47,7 +47,7 @@ class TwillServiceProvider extends ServiceProvider
*
* @var string
*/
const VERSION = '2.3.0';
const VERSION = '2.3.1';

/**
* Service providers to be registered.
Expand Down