Commit 9e5f8a03 authored by webchick's avatar webchick

#445094 by yched: Fix failing tests in SQLite/PostgreSQL due to passing in...

#445094 by yched: Fix failing tests in SQLite/PostgreSQL due to passing in NULL values for ftid and ftvid.
parent b8aad0a7
......@@ -129,8 +129,13 @@ function field_test_field_build_modes($obj_type) {
*/
function field_test_create_stub_entity($id = 1, $vid = 1, $bundle = FIELD_TEST_BUNDLE) {
$entity = new stdClass();
$entity->ftid = $id;
$entity->ftvid = $vid;
// Only set id and vid properties if they don't come as NULL (creation form).
if (isset($id)) {
$entity->ftid = $id;
}
if (isset($vid)) {
$entity->ftvid = $vid;
}
$entity->fttype = $bundle;
return $entity;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment