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.
    If you find EspoCRM good, we would greatly appreciate it if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • #3
      It's the same behavior as PHP has. It will throw error in the future.
      If you find EspoCRM good, we would greatly appreciate it if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...
      X