INNER CODE UNIT · C
path
mongodb/mongo-php-driver · src/phongo_bson.c:1188
char* path = phongo_field_path_as_string(state->field_path);
phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE, "Detected corrupt BSON data for field path '%s' at offset %d", path, iter.err_off);
efree(path);
}
goto cleanup;
}
/* If the root document is an array, default to a native array type.
* If phongo_bson_visit_binary() found an ODM class, it should supersede
* a default type map and named root class. */
if (state->map.root.type == PHONGO_TYPEMAP_NONE) {
if (state->is_visiting_array) {
state->map.root.type = PHONGO_TYPEMAP_NATIVE_ARRAY;
} else if (state->odm_ce) {
state->map.root.type = PHONGO_TYPEMAP_CLASS;
}
}