Skip to content
Snippets Groups Projects

Issue #2925972: FieldItemList::equals() doesn't correctly compare textfield values with leading zeros

Issue #2925972: FieldItemList::equals() doesn't correctly compare textfield values with leading zeros
1 unresolved thread
1 unresolved thread

Closes #2925972

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 921e45ef - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Juraj Nemec resolved all threads

    resolved all threads

  • 444 444 }
    445 445
    446 /**
    447 * Compares multidimensional arrays.
    448 *
    449 * Uses soft rules to compare scalar values inside of the arrays.
    450 *
    451 * @param array $array1
    452 * The array to compare to.
    453 * @param array $array2
    454 * The array to compare to.
    455 *
    456 * @return bool
    457 * TRUE if arrays are equal, FALSE if not.
    458 */
    459 protected function arrayEquals(array $array1, array $array2): bool {
    • I think the default return here should be FALSE and not TRUE. I.e. in the loop we should be checking for equality rather than inequality. Because WRT to data loss it is safer. Also this method needs a really good unit test testing all assumptions.

    • Please register or sign in to reply
    Please register or sign in to reply
    Loading