Skip to content

Commit 40c32ce

Browse files
authored
Check for subclasses of DynamicComponent (#50471)
1 parent b2535c1 commit 40c32ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/View/Compilers/ComponentTagCompiler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ protected function componentString(string $component, array $attributes)
262262
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass('.$class.'::class))->getConstructor()): ?>
263263
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
264264
<?php endif; ?>
265-
<?php $component->withAttributes(['.$this->attributesToStringWithExistingComponentData($attributes->all(), $escapeAttributes = $class !== DynamicComponent::class).']); ?>';
265+
<?php $component->withAttributes(['.$this->attributesToStringWithExistingComponentData($attributes->all(), $escapeAttributes = $class !== DynamicComponent::class && ! is_subclass_of($class, DynamicComponent::class)).']); ?>';
266266
}
267267

268268
/**

0 commit comments

Comments
 (0)