Fix some php errors.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 1 Nov 2010 15:05:28 +0000 (16:05 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Mon, 1 Nov 2010 15:05:28 +0000 (16:05 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/pldbtableentry.php

index 363da58..8d9c038 100644 (file)
@@ -166,8 +166,7 @@ class DateFieldFormatter implements PlDBTableFieldFormatter
 
     public function __construct(PlDBTableField $field, $date)
     {
-        $date = $value;
-        $this->datetime = make_datetime($value);
+        $this->datetime = make_datetime($date);
         if (is_null($this->datetime)) {
             throw new PlDBBadValueException($date, $field, 'value is expected to be a date/time, ' . $date . ' given');
         }
@@ -650,7 +649,7 @@ class PlDBTableEntry extends PlAbstractIterable
     public function copy(PlDBTableEntry $other)
     {
         Platal::assert($this->table == $other->table,
-                       "Trying to fill an entry of table {$this->table} with content of {$other->table}.");
+                       "Trying to fill an entry of table {$this->table->table} with content of {$other->table->table}.");
         $this->changed = $other->changed;
         $this->fetched = $other->fetched;
         $this->data    = $other->data;