I wonder what's the reason for filtering attributes in
function aws_simpledb_build_attributes_array($attributes, $replace = FALSE) {
// Remove empty values from array.
$attributes = array_filter($attributes);
...
}
Discovered this bug when tried to overwrite a non-empty value in SDB with a numeric "0". Before converting to string, this function deletes the numeric "0" values because it consider them as FALSE. See http://www.php.net/array_filter
So, why filtering there?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | aws-sdb-filter-905258.patch | 495 bytes | claudiu.cristea |
Comments
Comment #1
claudiu.cristeaI can see the reason on new record, to not save empty columns. But when invoking
aws_simpledb_put_attributes()to replace values on an existing record, it simply let the old values for those fields when trying to set them to "0".Attached, a simple patch that remove array filtering.
Comment #2
davisben