1
0
mirror of synced 2025-02-20 14:13:15 +03:00

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.
This commit is contained in:
doctrine 2006-06-19 08:04:39 +00:00
parent 1fd421d09e
commit 7b19bef12b
2 changed files with 3 additions and 3 deletions

View File

@ -210,7 +210,7 @@ class Doctrine_Locking_Manager_Pessimistic
* When called without parameters all locks older than 15 minutes are released.
*
* @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
*/
public function releaseAgedLocks($age = 900)
@ -226,7 +226,7 @@ class Doctrine_Locking_Manager_Pessimistic
$count = $stmt->rowCount();
return ($count > 0);
return $count;
}
catch(PDOException $pdoe)
{

View File

@ -535,7 +535,7 @@ class Doctrine_Query extends Doctrine_Access {
$pointer = $this->joins[$name];
$alias = $this->tables[$pointer]->getAlias($name);
$fk = $this->tables[$pointer]->getForeignKey($alias);
if( ! $prev[$pointer])
if( ! isset($prev[$pointer]) )
continue;
$last = $prev[$pointer]->getLast();