Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Did a search for statements similar to expression ? TRUE : FALSE
, and just replaced it with (bool) expression for simplicity.
Comment | File | Size | Author |
---|---|---|---|
#1 | ternary-booleans-319666-1-D7.patch | 5.48 KB | Dave Reid |
Comments
Comment #1
Dave ReidPatch replaces any condition ? TRUE : FALSE or condition ? FALSE : TRUE ternary conditionals. I did a search for condition ? 0 : 1 and similar, but I'm not sure if I should replace those. Having to cast a boolean result to an int seems more complex than using the ternary in those cases.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedThis looks good. It contains some space clean-up which is under a different issue.
Comment #3
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.