- ๐จ๐ญSwitzerland berdir Switzerland
That strlen thing seems unecessary? array_filter() defaults to an empty check, that should be sufficient here?
- Assigned to samit.310@gmail.com
- Status changed to Needs review
over 1 year ago 12:04pm 12 May 2023 - ๐ฎ๐ณIndia samit.310@gmail.com
Hi @Berdir,
I reviewed this, strlen function is needed here, array_filter() does not do an empty check.
Following is the example code.
<?php $a1=array('a','b','c',''); print_r(array_filter($a1, function ($item) { return $item !== NULL && strlen($item); })); // Output: With strlen Array ( [0] => a [1] => b [2] => c ) // Output: Without strlen Array ( [0] => a [1] => b [2] => c [3] => )
- ๐จ๐ญSwitzerland berdir Switzerland
https://3v4l.org/naCiZ says otherwise :)
- Status changed to Needs work
over 1 year ago 8:37pm 12 May 2023 - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 5:20am 16 May 2023 - ๐ฎ๐ณIndia samit.310@gmail.com
Hi @Berdir,
Thanks for your suggestion, I have updated the code, here is the Patch
- ๐ฎ๐ณIndia keshavv India
keshav.k โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia keshavv India
Hi @Berdir,
I have updated the MR with latest changes. Please check. -
Berdir โ
committed 43d4df3b on 8.x-5.x authored by
isaacrc โ
Issue #3324345 by isaacrc, Berdir, samit.310@gmail.com, keshav.k:...
-
Berdir โ
committed 43d4df3b on 8.x-5.x authored by
isaacrc โ
- Status changed to Fixed
over 1 year ago 7:33pm 17 May 2023 - ๐จ๐ญSwitzerland lomale@bluewin.ch Switzerland
I can confirm, the error no longer exists.
I only have problems with the synchronization of the address data.
ADDRESS:
addr1: [webform_submission:values:address:address]
addr2: [webform_submission:values:address:address_2]
city: [webform_submission:values:address:city]
state: [webform_submission:values:address:state_province]
zip: [webform_submission:values:address:postal_code]
country: [webform_submission:values:address:country]
does not work anymore.
Thanks anyway. Automatically closed - issue fixed for 2 weeks with no activity.