Skip to content

Commit

Permalink
Fixes a logger related crash.
Browse files Browse the repository at this point in the history
Since we use a stream writer, which stores a reference to a file
resource, we need to avoid storing a reference to the cache object in
the store class, since it is saved in session.
  • Loading branch information
Philipp Frischmuth committed Dec 6, 2011
1 parent 7e8074c commit 87f1e55
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Erfurt/Store.php
Expand Up @@ -1763,10 +1763,7 @@ private function _getTransitiveClosure($modelIri, $property, $startResources, $i
*/
protected function _getQueryLogger()
{
if (null === $this->_queryLogger) {
$this->_queryLogger = Erfurt_App::getInstance()->getLog('queries');
}
return $this->_queryLogger;
return $this->_queryLogger = Erfurt_App::getInstance()->getLog('queries');
}

/**
Expand All @@ -1776,9 +1773,6 @@ protected function _getQueryLogger()
*/
protected function _getErfurtLogger()
{
if (null === $this->_erfurtLogger) {
$this->_erfurtLogger = Erfurt_App::getInstance()->getLog('erfurt');
}
return $this->_erfurtLogger;
return $this->_erfurtLogger = Erfurt_App::getInstance()->getLog('erfurt');
}
}

0 comments on commit 87f1e55

Please sign in to comment.