Because of the use of empty, the status of an entity can never be set to 0 prior to _sf_entity_import_process_entity or _sf_entity_import_preprocess_entity being called. Here are two examples found in sf_entity.module:
Lines 1119-1122:
// Set the node to published, if a status has not already been set.
if (!isset($entity->status) || empty($entity->status)) {
$entity->status = 1;
}
Lines 1156-1159:
// If status is still empty, set it to 1 (active)
if (!isset($entity->status) || empty($entity->status)) {
$entity->status = 1;
}
I'd propose the following revision:
// If status is still empty, set it to 1 (active)
if (!isset($entity->status) || (empty($entity->status) && $entity->status != 0)) {
$entity->status = 1;
}
Comments
Comment #1
kostajh commentedPlease submit a patch if you'd like to see this in 7.x-2.x
Comment #2
aaronbaumancommitted ee57d320 using a check for property_exists() instead.