Index: branches/lqt-updates/extensions/LiquidThreads/classes/model/PostVersion.php |
— | — | @@ -467,8 +467,10 @@ |
468 | 468 | $this->id = $dbw->insertId(); |
469 | 469 | |
470 | 470 | // Update pointer |
471 | | - $dbw->update( 'lqt_post', array( 'lqp_current_version', $this->id ), |
472 | | - array( 'lqp_id' => $this->postID ), __METHOD__ ); |
| 471 | + if ( $this->postID ) { |
| 472 | + $dbw->update( 'lqt_post', array( 'lqp_current_version', $this->id ), |
| 473 | + array( 'lqp_id' => $this->postID ), __METHOD__ ); |
| 474 | + } |
473 | 475 | } |
474 | 476 | |
475 | 477 | /** |