Skip to content
Snippets Groups Projects
Commit 9e5f8a03 authored by Angie Byron's avatar Angie Byron
Browse files

#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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment