Skip to content

Commit 5a5dda0

Browse files
committed
Fix php error
1 parent bd18763 commit 5a5dda0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Behaviors/HasSlug.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function updateOrNewSlug(array $slugParams): void
175175
$this->slugs()->whereKey($oldMatchingSlug->getKey())->update(['active' => $isNowActive]);
176176
if ($this->relationLoaded('slugs')) {
177177
// Report update to slugs so that getSlug() returns the correct value
178-
$slug = $this->slugs->whereKey($oldMatchingSlug->getKey());
178+
$slug = $this->slugs->where($this->slugs()->getModel()->getKeyName(), $oldMatchingSlug->getKey());
179179
if ($slug) {
180180
$slug->active = $isNowActive;
181181
$slug->syncOriginalAttribute('active');

0 commit comments

Comments
 (0)