diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-28 05:24:41 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-28 05:24:41 +0000 |
commit | 9e5f8a037b75394958ad5eacd95a083502d4ef99 (patch) | |
tree | 480a2066025a8c8944e8e0e8b970c19d97ce7136 | |
parent | b8aad0a7641692619cc1b5be140ece1279d8fdfd (diff) | |
download | brdo-9e5f8a037b75394958ad5eacd95a083502d4ef99.tar.gz brdo-9e5f8a037b75394958ad5eacd95a083502d4ef99.tar.bz2 |
#445094 by yched: Fix failing tests in SQLite/PostgreSQL due to passing in NULL values for ftid and ftvid.
-rw-r--r-- | modules/simpletest/tests/field_test.module | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/simpletest/tests/field_test.module b/modules/simpletest/tests/field_test.module index f82fec9b3..4c2607d99 100644 --- a/modules/simpletest/tests/field_test.module +++ b/modules/simpletest/tests/field_test.module @@ -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; |