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   1374 Views

Avatar
Markus

Google Summer of Code Hacker, 152 Posts

20 August 2007 at 10:07pm

Edited: 20/08/2007 10:08pm

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

Google Summer of Code Hacker, 11 Posts

21 August 2007 at 10:06am

Hi Markus,

It seems that this is set at line 400:

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

Avatar
Markus

Google Summer of Code Hacker, 152 Posts

21 August 2007 at 8:01pm

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