Skip to content

Remove incorrect statement about empty

homotechsual requested to merge github/fork/eileenmcnaughton/patch-10 into master

Created by: eileenmcnaughton

The documentation implies that empty() will implicitly break. This is not true - empty works on the property bag. However, there is a gotcha - if we look at the below:

Screen Shot 2020-06-12 at 8 24 37 AM

We see that the parameter 'first_name' and 'billing_first_name' have been passed in. So $params['firstName']) is FALSE for the $params but TRUE for the propertyBag - because the mapping of 'firstName' is defined for the propertyBag.

Conversely - the property bag does not have a mapping for 'billing_first_name' - so it shows as empty. We need to find the params that aren't & should be mapped, like billing_first_name but in terms of docs I don't think we should imply empty 'doesn't work'

(note $g is false above - hard to tell in that screenshot)

Merge request reports