summaryrefslogtreecommitdiff
path: root/lib/schema.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-10-01 15:43:08 -0400
committerEvan Prodromou <evan@status.net>2009-10-01 15:43:08 -0400
commit544c58d263e61e2eda3b2c54a4f0a1a6bbfa4910 (patch)
tree90c9e1cdd616392c4bf5f6426a350fb0a374a20d /lib/schema.php
parentd103522ff364098ed26305b31d1cb62f87de1318 (diff)
Some bug fixes
The $tomod variable wasn't set, and the ColumnDef constructor didn't work without any args. These are fixed.
Diffstat (limited to 'lib/schema.php')
-rw-r--r--lib/schema.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/schema.php b/lib/schema.php
index 056c2093d..8c8f5e9ff 100644
--- a/lib/schema.php
+++ b/lib/schema.php
@@ -284,6 +284,8 @@ class Schema
$same = array_intersect($new, $cur);
+ $tomod = array();
+
foreach ($same as $m) {
$curCol = $this->_byName($td->columns, $m);
$newCol = $this->_byName($columns, $m);
@@ -386,8 +388,9 @@ class ColumnDef
public $default;
public $extra;
- function __construct($name, $type, $size=null, $nullable=true,
- $key=null, $default=null, $extra=null) {
+ function __construct($name=null, $type=null, $size=null,
+ $nullable=true, $key=null, $default=null,
+ $extra=null) {
$this->name = strtolower($name);
$this->type = strtolower($type);
$this->size = $size+0;