When collection has no vars then dont try to collect them

(cherry picked from commit ee7528186f69e811b1b4db8e69ea2e4ec0ea2613)
pull/5/head
Anthony Axenov 2023-08-13 11:00:40 +08:00
parent c6094566b4
commit 2c4eedbf8b
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ abstract class AbstractConverter implements ConverterContract
*/
protected function setVariables(): static
{
if ($this->collection->variable) {
if (isset($this->collection?->variable)) {
foreach ($this->collection->variable as $var) {
$this->vars["{{{$var->key}}}"] = $var->value;
}