Bug #45413

Overriding boolean properties using Objects.yaml is broken

Added by Rens Admiraal almost 7 years ago. Updated almost 6 years ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-02-12
Due date:
% Done:

100%


Description

When a boolean property is overriden like for example:

TYPO3\Flow\Mvc\Routing\UriBuilder:
  properties:
    linkProtectionEnabled:
      value: FALSE

the generated code is incorrect. The TRUE value becomes a call like:

$this->setLinkProtectionEnabled(1);

and the FALSE value becomes:

$this->setLinkProtectionEnabled();

The 1 being used as TRUE will still work in PHP of course, the FALSE value will break if the argument is required.

Associated revisions

Revision 206c7371 (diff)
Added by Rens Admiraal almost 7 years ago

[BUGFIX] Correctly handle boolean values with property injection

This change fixes a bug in the property injection where an empty string
or 1 are used for representing a boolean value. This change forces the
value to be TRUE or FALSE when the value configured in Objects.yaml
is a boolean value.

Change-Id: I3ea2da3c3f00f441056fa41de9b208d159cfc520
Resolves: #45413
Releases: master, 2.0, 1.1

Revision 4f67ebe4 (diff)
Added by Rens Admiraal over 6 years ago

[BUGFIX] Correctly handle boolean values with property injection

This change fixes a bug in the property injection where an empty string
or 1 are used for representing a boolean value. This change forces the
value to be TRUE or FALSE when the value configured in Objects.yaml
is a boolean value.

Change-Id: I3ea2da3c3f00f441056fa41de9b208d159cfc520
Resolves: #45413
Releases: master, 2.0, 1.1

History

#1 Updated by Gerrit Code Review almost 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18221

#2 Updated by Gerrit Code Review almost 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18221

#3 Updated by Gerrit Code Review almost 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18221

#4 Updated by Gerrit Code Review almost 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18221

#5 Updated by Rens Admiraal almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:206c7371dac8d67fec6180a24098cff6cbf42f4f.

#6 Updated by Gerrit Code Review over 6 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19073

#7 Updated by Rens Admiraal over 6 years ago

  • Status changed from Under Review to Resolved

Applied in changeset commit:4f67ebe472a176676b2e6dd7741db77441c7224a.

#8 Updated by Gerrit Code Review over 6 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at https://review.typo3.org/21643

#9 Updated by Gerrit Code Review almost 6 years ago

Patch set 2 for branch FLOW3-1.1 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/21643

Also available in: Atom PDF