Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/b3ae770fa34b6fbf9393 to your computer and use it in GitHub Desktop.
Save doctrinebot/b3ae770fa34b6fbf9393 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DBAL-101 - https://github.com/doctrine/dbal/issues/939
From 493a3da56343484d4871cd2074def8e556188446 Mon Sep 17 00:00:00 2001
From: Karsten Dambekalns <karsten@typo3.org>
Date: Wed, 16 Mar 2011 21:01:18 +0100
Subject: [PATCH 2/2] [BUGFIX] Fix undefined index error on SqliteSchemaManager
Change-Id: Ie82234a9b79a3379a79cbb83395e807a7f6ad610
---
.../Doctrine/DBAL/Schema/SqliteSchemaManager.php | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Resources/PHP/Doctrine/DBAL/Schema/SqliteSchemaManager.php b/Resources/PHP/Doctrine/DBAL/Schema/SqliteSchemaManager.php
index 5c7d005..c274085 100644
--- a/Resources/PHP/Doctrine/DBAL/Schema/SqliteSchemaManager.php
+++ b/Resources/PHP/Doctrine/DBAL/Schema/SqliteSchemaManager.php
@@ -155,7 +155,11 @@ class SqliteSchemaManager extends AbstractSchemaManager
case 'real':
case 'decimal':
case 'numeric':
- list($precision, $scale) = array_map('trim', explode(', ', $tableColumn['length']));
+ if (array_key_exists('length', $tableColumn)) {
+ list($precision, $scale) = array_map('trim', explode(', ', $tableColumn['length']));
+ } else {
+ $precision = $scale = null;
+ }
$length = null;
break;
}
--
1.7.4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment