Skip to content

Commit 25f857e

Browse files
rixafydg
authored andcommitted
Fix compatibility with PHP 7.4 (#199)
1 parent c690255 commit 25f857e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Latte/Runtime/FilterExecutor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ private function prepareFilter(string $name): array
178178
? new \ReflectionMethod($callback[0], $callback[1])
179179
: new \ReflectionFunction($callback);
180180
$this->_static[$name][1] = ($tmp = $ref->getParameters())
181-
&& (string) $tmp[0]->getType() === FilterInfo::class;
181+
&& $tmp[0]->getType() !== null
182+
&& $tmp[0]->getType()->getName() === FilterInfo::class;
182183
}
183184
return $this->_static[$name];
184185
}

0 commit comments

Comments
 (0)