Announcement

Collapse
No announcement yet.

Behaviour of formula string\split

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Behaviour of formula string\split

    Hi

    I was using this expression

    $array = string\split($txtfield,',');

    It split text by the comma as expected and provide as many items of the array as expected.

    If the field $txtfield has some text without any comma gives an one single item array. Perfect.

    But if $txtfield is null I would expect it provides an empty array with no item

    Instead of that I receive an array with one item. And that item is null

    Seems to me that this behaviour is not correct.
    ‚Äč

  • #2
    Not sure. I'd rather throw an error. It treats null as ''. I'm ok with it.

    Comment


    • #3
      It's the same behavior as PHP has. It will throw error in the future.

      Comment

      Working...
      X