undefined index on preview

Bug #566226 reported by EdB
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quam Plures
Fix Released
Medium
Tilman Blumenbach

Bug Description

When previewing a post, either saved or unsaved, an error is generated above the post text. See http://forums.quamplures.net/viewtopic.php?f=13&t=325 if you're into it, but the error text is:

Notice: Undefined index: 0 in /path/inc/items/model/_itemlight.class.php on line 515

Warning: Invalid argument supplied for foreach() in /path/inc/items/model/_itemlight.class.php on line 532
Categories:

Related branches

Revision history for this message
Yabs (yabs) wrote :

inc/items/model/_itemlight.class approx 155, adding the new bit seems to cure this

<code>
  if( $db_row == NULL )
  { // New item:
   $this->ID = 0;
   $this->set( 'issue_date', date('Y-m-d H:i:s', $localtimenow) );
  }
  else
  {
   if( !( $this->ID = $db_row->$dbIDname ) )
   { // preview mode bugfix
    $this->extra_cat_IDs = array( $db_row->post_main_cat_ID );
   }
</code>

¥

Yabs (yabs)
Changed in quam-plures:
status: New → Fix Committed
Revision history for this message
Tilman Blumenbach (tblue) wrote :

Uhm, you see this bug is assigned to me, right? I'm actually working at it right now.

EdB (edb)
Changed in quam-plures:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.