The commerce_remote_id field checks if an item is empty by calling PHP's empty() function on both the remote_id and the provider. A remote ID could be any string, including "0". However, empty("0") returns true, and that string doesn't get saved.

The attached patch checks that the remote_id property is empty AND that its length as a string is zero.

CommentFileSizeAuthor
remote_id_zero_value.patch523 bytesfloretan

Comments

floretan created an issue. See original summary.

  • bojanz committed 4489511 on 8.x-2.x authored by floretan
    Issue #2846596 by floretan: RemoteId fields cannot use "0" as a value
    
bojanz’s picture

Status: Active » Fixed

Tweaked to use the core pattern of comparing against NULL and empty string. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.