Skip to content

Commit d8e6b3d

Browse files
committed
handle case for "@Property('fieldGroup', 'fieldName', null, $customDTO)"
1 parent b0f3c57 commit d8e6b3d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Helpers/TemplateHelper.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ public static function splitBladeExpressionForProperty(string $bladeExpression)
155155
$property = static::normalizeVarNameFromBladeExpression($property);
156156

157157
$propertyVarName ??= static::generatePropertyVarName($group, $property);
158+
// Ensure the variable name is not empty or null
159+
if (empty($propertyVarName) || is_null($propertyVarName) || $propertyVarName === 'null') {
160+
$propertyVarName = static::generatePropertyVarName($group, $property);
161+
}
162+
158163
$dtoVar ??= '$content';
159164

160165
return [$group, $property, $dtoVar, static::normalizeVarNameFromBladeExpression($propertyVarName)];

0 commit comments

Comments
 (0)