mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added test & update to prevent page creation w/ empty slug
Caused by changes to page repo in reference work, This adds back in the slug generate although at a more central place. Adds a test case to cover the problematic scenario.
This commit is contained in:
@ -56,7 +56,7 @@ class BaseRepo
|
||||
$entity->fill($input);
|
||||
$entity->updated_by = user()->id;
|
||||
|
||||
if ($entity->isDirty('name')) {
|
||||
if ($entity->isDirty('name') || empty($entity->slug)) {
|
||||
$entity->refreshSlug();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user