Skip to content

Commit

Permalink
Fixed build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Syroeshko committed Aug 16, 2015
1 parent 4238154 commit 48a88f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/PhpWord/TemplateProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,10 @@ protected function getHeaderName($index)
*/
protected function findRowStart($offset)
{
$rowStart = strrpos($this->temporaryDocumentMainPart, '<w:tr ', ((strlen($this->temporaryDocumentMainPart) - $offset) * -1));
$rowStart = strrpos($this->tempDocumentMainPart, '<w:tr ', ((strlen($this->tempDocumentMainPart) - $offset) * -1));

if (!$rowStart) {
$rowStart = strrpos($this->temporaryDocumentMainPart, '<w:tr>', ((strlen($this->temporaryDocumentMainPart) - $offset) * -1));
$rowStart = strrpos($this->tempDocumentMainPart, '<w:tr>', ((strlen($this->tempDocumentMainPart) - $offset) * -1));
}
if (!$rowStart) {
throw new Exception('Can not find the start position of the row to clone.');
Expand All @@ -462,7 +462,7 @@ protected function findRowStart($offset)
*/
protected function findRowEnd($offset)
{
return strpos($this->temporaryDocumentMainPart, '</w:tr>', $offset) + 7;
return strpos($this->tempDocumentMainPart, '</w:tr>', $offset) + 7;
}

/**
Expand All @@ -475,9 +475,9 @@ protected function findRowEnd($offset)
protected function getSlice($startPosition, $endPosition = 0)
{
if (!$endPosition) {
$endPosition = strlen($this->temporaryDocumentMainPart);
$endPosition = strlen($this->tempDocumentMainPart);
}

return substr($this->temporaryDocumentMainPart, $startPosition, ($endPosition - $startPosition));
return substr($this->tempDocumentMainPart, $startPosition, ($endPosition - $startPosition));
}
}

0 comments on commit 48a88f9

Please sign in to comment.