From 03698e4068d7f5bf00b74d0c4bfe2f77f7c28c89 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Thu, 13 Jan 2011 21:43:33 +0100 Subject: [PATCH] DDC-975 - Fix notice in SchemaTool in combination with XML mapping driver. --- lib/Doctrine/ORM/Tools/SchemaTool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index 1addcfe67..726793d8d 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -509,7 +509,7 @@ class SchemaTool if (isset($joinColumn['nullable'])) { $columnOptions['notnull'] = !$joinColumn['nullable']; } - if ($fieldMapping['type'] == "string") { + if ($fieldMapping['type'] == "string" && isset($fieldMapping['length'])) { $columnOptions['length'] = $fieldMapping['length']; } else if ($fieldMapping['type'] == "decimal") { $columnOptions['scale'] = $fieldMapping['scale'];