Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6010

Conversion to Numeric by adding 0 to String fails for '0' padded values '08' and '09'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 4.3.1, PUP 4.3.2
    • Fix Version/s: None
    • Component/s: Compiler
    • Labels:
      None
    • Template:

      Description

      The conversion of a string to numeric fails on a specific value ('08').

      puppet apply -e 'notify{"result: ${'04' + 0}": }'
      Notice: Compiled catalog for test.local in environment production in 0.05 seconds
      Notice: result: 4
      Notice: /Stage[main]/Main/Notify[result: 4]/message: defined 'message' as 'result: 4'
      Notice: Applied catalog in 0.26 seconds
      

      puppet apply -e 'notify{"result: ${'08' + 0}": }'
      Error: Could not parse for environment production: Not a valid octal number 08  at line 1:19 on node test.local
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            xanias Dimitris Stafylarakis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support