Skip to content

Commit

Permalink
Merge pull request #602 from MArcJ/fix-errorreporting
Browse files Browse the repository at this point in the history
Fixed #601.
  • Loading branch information
willdurand committed Feb 14, 2013
2 parents dd9d189 + 01ea918 commit 661f895
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions runtime/lib/util/BasePeer.php
Expand Up @@ -334,8 +334,8 @@ public static function doUpdate(Criteria $selectCriteria, Criteria $updateValues

// Get list of required tables, containing all columns
$tablesColumns = $selectCriteria->getTablesColumns();
if (empty($tablesColumns)) {
$tablesColumns = array($selectCriteria->getPrimaryTableName() => array());
if (empty($tablesColumns) && ($table = $selectCriteria->getPrimaryTableName())) {
$tablesColumns = array($table => array());
}

// we also need the columns for the update SQL
Expand Down
Expand Up @@ -47,13 +47,11 @@ public function setUp()
/**
* See: https://github.com/propelorm/Propel/issues/515
*
* @expectedException PropelException
* @expectedExceptionMessage Unable to execute UPDATE statement [UPDATE SET ] [wrapped: Undefined index: ]
*/
public function testShiftRank()
{
$peer = new \Test\SortableTest1Peer();
$peer->shiftRank(1);
$peer->shiftRank(1); //should not throw any exception
}

public function testParameters()
Expand Down
Expand Up @@ -48,7 +48,9 @@ protected function setUp()

protected function tearDown()
{
$this->con->rollback();
if ($this->con) {
$this->con->rollback();
}

parent::tearDown();
Propel::init(dirname(__FILE__) . '/../../../../fixtures/bookstore/build/conf/bookstore-conf.php');
Expand Down

0 comments on commit 661f895

Please sign in to comment.