Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2357

bug: ifelse chokes on empty strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.6.5, 3.7.2, 3.8.0
    • Fix Version/s: 3.7.4, 3.9.1
    • Component/s: Evaluation
    • Labels:
      None
    • Environment:
      CentOS 6.5, CentOS 7.2, FreeBSD 11.0

      Description

      On all versions of CFEngine and operating systems, ifelse() chokes on empty strings.

      "mystring" string => ifelse("!any","foo","bar");

      ^ string evaluates to "bar"

      "mystring" string => ifelse("!any","","bar");

      ^ string remains undefined

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                lifanov Nikolai Lifanov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel