]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Some bug fixes
authorEvan Prodromou <evan@status.net>
Thu, 1 Oct 2009 19:43:08 +0000 (15:43 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 1 Oct 2009 19:43:08 +0000 (15:43 -0400)
The $tomod variable wasn't set, and the ColumnDef constructor
didn't work without any args. These are fixed.

lib/schema.php

index 056c2093d6594ef6d295004f2ed67a4e8a767f18..8c8f5e9ff514c5f07cf2487ce69f1b3a1a331634 100644 (file)
@@ -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;