TYPO3 Forger
  • Dashboard
  • Get involved
  • Reviews
    Overview Ready for review Work in progress Needs action Needs review Needs verification Needs rebase Negative votes Reviewed and verified Ready to merge
  • Issues
    Stale issues Possible duplicates By category By month
  • Sprints
    Overview Initiatives TYPO3 Core Review board
  • Tools
    Backports ReST helper
  • Help
  • Search
  • Login
Esc

Words find the open ones, a number the issue and the change with it.

  1. Issues
  2. #91657
Issue Task Closed

#91657Use stdWrapValue consitently instead of manually checking existing config with ternary operator

Nikita Hovratov 06/16/20, 15:57 updated 12/22/20, 11:07

Open in Forge Comment in Forge

Description

A common way to apply stdWrap is: $value = isset($config[‘value.’]) ? $cObj->stdWrap($config[‘value’], $config[‘value.’]) : $config[‘value’];
This can be replaced by $value = $cObj->stdWrapValue(‘value’, $config);
Not only is it shorter, it is also more robust and less error-prone.

Reviews 3

  • main 65064[TASK] Use stdWrapValue where possible (part 2) Related to this issue Merged Nikita Hovratov CR +2 V +2 Hard +149 −227 10/07/21, 18:36
  • main 65618[BUGFIX] Add null coalesce operator for stdWrapValue second parameter Related to this issue Merged Nikita Hovratov CR +2 V +2 Hard +128 −128 09/07/20, 16:18
  • main 64898[TASK] Use $cObj->stdWrapValue where possible Resolves this issue Merged Nikita Hovratov CR +2 V +2 Hard +277 −297 07/21/20, 09:58

Related issues 3

  • Task #91834Use stdWrapValue where possible part 2 Related to Closed Code Cleanup v11 Nikita Hovratov 07/21/20, 16:11
  • Bug #92216StdWrapValue gets null as second parameter in some setups Related to Closed Backend API v11 Nikita Hovratov 09/07/20, 15:34
  • Bug #92698variables in ContentContentObject::render Related to Closed Frontend v10 David Bruchmann 10/24/20, 12:04
Author
Nikita Hovratov
Priority
Should have
TYPO3 version
11
© 2026 TYPO3 GmbH.
  • API
  • Privacy Policy
  • Legal Notice
  • Feedback