Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 5.4:
  fix style of label containing new lines in PUML dump
  [TwigBridge] Allow floats in html5 input type number field
  [Translation] Handle the translation of empty strings
  [VarDumper] Fix error when reflected class has default Enum parameter in constructor
  [FrameworkBundle] Fix denyAccessUnlessGranted for mixed attributes
  [Validator] Fix translation of AtLeastOneOf constraint message
  [Validator] Sync IBAN formats with Swift IBAN registry
  [String] Use same alphabet for ByteString::fromRandom tests
  Fix phpdocs in components
  • Loading branch information
nicolas-grekas committed Feb 24, 2023
2 parents cd85cc7 + 6c5ac3a commit cf8d4ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Caster/Caster.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static function castObject(object $obj, string $class, bool $hasDebugInfo
* @param array $a The array containing the properties to filter
* @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out
* @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set
* @param int &$count Set to the number of removed properties
* @param int|null &$count Set to the number of removed properties
*/
public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array
{
Expand Down
2 changes: 1 addition & 1 deletion Caster/ReflectionCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
if ($c->isOptional()) {
try {
$a[$prefix.'default'] = $v = $c->getDefaultValue();
if ($c->isDefaultValueConstant()) {
if ($c->isDefaultValueConstant() && !\is_object($v)) {
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
}
if (null === $v) {
Expand Down

0 comments on commit cf8d4ca

Please sign in to comment.