Skip to content

Commit

Permalink
Merge pull request #19354 from demeritcowboy/php74-more-more
Browse files Browse the repository at this point in the history
php 7.4 compatiblity - Clarify order for nested ternary operator
  • Loading branch information
seamuslee001 authored Jan 9, 2021
2 parents e49a38a + 6b8f5a2 commit 67f045c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/afform/core/Civi/Api4/Utils/AfformSaveTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function writeRecord($item) {

// If no name given, create a unique name based on the title
if (empty($item['name'])) {
$prefix = !empty($item['join']) ? "afjoin-{$item['join']}" : !empty($item['block']) ? 'afblock-' . str_replace('*', 'all', $item['block']) : 'afform';
$prefix = !empty($item['join']) ? "afjoin-{$item['join']}" : (!empty($item['block']) ? ('afblock-' . str_replace('*', 'all', $item['block'])) : 'afform');
$item['name'] = _afform_angular_module_name($prefix . '-' . \CRM_Utils_String::munge($item['title'], '-'));
$suffix = '';
while (
Expand Down

0 comments on commit 67f045c

Please sign in to comment.