fix scrutinizer warnings

This commit is contained in:
troosan 2019-02-04 22:57:33 +01:00
parent bc448aed6c
commit d2b0b317e0
1 changed files with 2 additions and 2 deletions

View File

@ -1088,7 +1088,7 @@ class TemplateProcessor
protected function replaceXmlBlock($macro, $block, $blockType = 'w:p')
{
$where = $this->findContainingXmlBlockForMacro($macro, $blockType);
if (false !== $where) {
if (is_array($where)) {
$this->tempDocumentMainPart = $this->getSlice(0, $where['start']) . $block . $this->getSlice($where['end']);
}
@ -1132,7 +1132,7 @@ class TemplateProcessor
* Note that only the first instance of the macro will be found
*
* @param string $search Macro name
* @param string $offset Offset from which to start searching
* @param int $offset Offset from which to start searching
* @return int -1 if macro not found
*/
protected function findMacro($search, $offset = 0)