Since our CMS Drupal does occasionally assign the value zero to userID…#77
Since our CMS Drupal does occasionally assign the value zero to userID…#77btruong wants to merge 1 commit intosegmentio:masterfrom
Conversation
…, we need to allow segment calls to still validate when the userId is zero, so instead using not empty, using isset would allow the call to validate if the userId value happens to be zero
|
On the other hand it might certainly bite people if they have a bug and send data for multiple users under the same ID. |
|
After thinking this through, I'd rather leave the Can you fix this in your CMS upstream of the library? |
|
You can test for not empty while allowing zero in PHP with With the == operator, you get type juggling, so this will work for the integer 0 and string '0' Can this PR be updated and re-opened? |
|
@dustincurrie The 2nd part of my hesitation still stands #77 (comment).
|
…, we need to allow segment calls to still validate when the userId is zero, so instead using not empty, using isset would allow the call to validate if the userId value happens to be zero