Commit 7b19bef1 authored by doctrine's avatar doctrine

Bugfix: Changed "if( ! $prev[$pointer])" to "if( ! isset($prev[$pointer]) )" in

Query.php line 538.
Change: Changed return value of pessimistic locking releasedAgedLocks to return the number of released locks.
parent 1fd421d0
...@@ -210,7 +210,7 @@ class Doctrine_Locking_Manager_Pessimistic ...@@ -210,7 +210,7 @@ class Doctrine_Locking_Manager_Pessimistic
* When called without parameters all locks older than 15 minutes are released. * When called without parameters all locks older than 15 minutes are released.
* *
* @param integer $age The maximum valid age of locks in seconds * @param integer $age The maximum valid age of locks in seconds
* @return boolean TRUE if locks have been released, FALSE if no locks were released * @return integer The number of locks that have been released
* @throws Doctrine_Locking_Exception If the release process failed due to database errors * @throws Doctrine_Locking_Exception If the release process failed due to database errors
*/ */
public function releaseAgedLocks($age = 900) public function releaseAgedLocks($age = 900)
...@@ -226,7 +226,7 @@ class Doctrine_Locking_Manager_Pessimistic ...@@ -226,7 +226,7 @@ class Doctrine_Locking_Manager_Pessimistic
$count = $stmt->rowCount(); $count = $stmt->rowCount();
return ($count > 0); return $count;
} }
catch(PDOException $pdoe) catch(PDOException $pdoe)
{ {
......
...@@ -535,7 +535,7 @@ class Doctrine_Query extends Doctrine_Access { ...@@ -535,7 +535,7 @@ class Doctrine_Query extends Doctrine_Access {
$pointer = $this->joins[$name]; $pointer = $this->joins[$name];
$alias = $this->tables[$pointer]->getAlias($name); $alias = $this->tables[$pointer]->getAlias($name);
$fk = $this->tables[$pointer]->getForeignKey($alias); $fk = $this->tables[$pointer]->getForeignKey($alias);
if( ! $prev[$pointer]) if( ! isset($prev[$pointer]) )
continue; continue;
$last = $prev[$pointer]->getLast(); $last = $prev[$pointer]->getLast();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment