Bug #45864

PHP constants used in YAML loose their type

Added by Karsten Dambekalns over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2013-02-26
Priority:Should have Due date:
Assigned To:Adrian Föder % Done:

100%

Category:Configuration
Target version:TYPO3 Flow Base Distribution - 2.0
PHP Version: Complexity:
Has patch:No Affected Flow version:Flow 2.0.0 beta 1

Associated revisions

Revision e2e7e50c
Added by Adrian Föder over 2 years ago

[BUGFIX] Constants use in YAML Configuration maintains type

If a constant expression in the YAML configuration is used,
for example ``foo: '%PHP_VERSION_ID%'``, and the value
exclusively represents this constant (i.e. no additional string
concatenation like ``path: '%FLOW_PATH_DATA%Logs/Exception'``),
the value is substituted directly in order to maintain the initial
type of the constant.

Prior to this, a ``str_replace`` was done which resulted in a string
in every case no matter if the constant was meant to be an integer,
for example.

Change-Id: Iabfaddf30156c2eef45a8f658892bfc10435db48
Fixes: #45864
Releases: master, 2.0

Revision 67f0b8b8
Added by Adrian Föder over 2 years ago

[BUGFIX] Constants use in YAML Configuration maintains type

If a constant expression in the YAML configuration is used,
for example ``foo: '%PHP_VERSION_ID%'``, and the value
exclusively represents this constant (i.e. no additional string
concatenation like ``path: '%FLOW_PATH_DATA%Logs/Exception'``),
the value is substituted directly in order to maintain the initial
type of the constant.

Prior to this, a ``str_replace`` was done which resulted in a string
in every case no matter if the constant was meant to be an integer,
for example.

Change-Id: Iabfaddf30156c2eef45a8f658892bfc10435db48
Fixes: #45864
Releases: master, 2.0

History

#1 Updated by Gerrit Code Review over 2 years ago

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

#2 Updated by Adrian Föder over 2 years ago

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

#3 Updated by Gerrit Code Review over 2 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/19090

#4 Updated by Adrian Föder over 2 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF