Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Bug in DataObject


Reply

3 Posts   1363 Views

Avatar
Markus

20 August 2007 at 10:07pm (Last edited: 20 August 2007 10:08pm), Google Summer of Code Hacker, 152 Posts

Hi,

there is a bug in DataObject::write():

// New records have their insert into the base data table done
// first, so that they can pass the generated primary key on
// to the rest of the manipulation

line 419: $baseTable = $ancestry[0];

$ancestry is not set anywhere in the method!

Avatar
Bernat

21 August 2007 at 10:06am Google Summer of Code Hacker, 11 Posts

Hi Markus,

It seems that this is set at line 400:

      foreach($this->getClassAncestry() as $ancestor) {
         if(ClassInfo::hasTable($ancestor)) $ancestry[] = $ancestor;
      }

Avatar
Markus

21 August 2007 at 8:01pm Google Summer of Code Hacker, 152 Posts

Ahh right! I added the needed checks for that variable (r40621).