Skip to content

Commit

Permalink
Fixed owner bug in URLSegmentExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
colintucker committed Dec 7, 2017
1 parent dfc19c0 commit 114b6e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Extensions/Model/URLSegmentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function onBeforeWrite()
{
// Generate Valid URL Segment:

$this->generateValidURLSegment($this->getURLSegmentSource());
$this->owner->generateValidURLSegment($this->owner->getURLSegmentSource());
}

/**
Expand Down Expand Up @@ -135,13 +135,13 @@ public function generateValidURLSegment($string)
{
// Generate URL Segment:

$this->owner->URLSegment = $this->generateURLSegment($string);
$this->owner->URLSegment = $this->owner->generateURLSegment($string);

// Check for Duplicates:

$count = 2;

while (!$this->validURLSegment()) {
while (!$this->owner->validURLSegment()) {

$this->owner->URLSegment = sprintf(
'%s-%d',
Expand Down

0 comments on commit 114b6e8

Please sign in to comment.