Don't load the AutoLog class if we're not in debug mode
--- a/include/git/GitObjectLoader.class.php
+++ b/include/git/GitObjectLoader.class.php
@@ -66,7 +66,8 @@
return false;
}
- $autolog = new GitPHP_DebugAutoLog();
+ if (GitPHP_DebugLog::GetInstance()->GetEnabled())
+ $autolog = new GitPHP_DebugAutoLog();
// first check if it's unpacked
$path = $this->project->GetPath() . '/objects/' . substr($hash, 0, 2) . '/' . substr($hash, 2);
--- a/include/git/headlist/HeadListLoad_Raw.class.php
+++ b/include/git/headlist/HeadListLoad_Raw.class.php
@@ -36,7 +36,8 @@
if (empty($order))
return;
- $autotimer = new GitPHP_DebugAutoLog();
+ if (GitPHP_DebugLog::GetInstance()->GetEnabled())
+ $autotimer = new GitPHP_DebugAutoLog();
$heads = $headList->GetHeads();
--- a/include/git/reflist/RefListLoad_Raw.class.php
+++ b/include/git/reflist/RefListLoad_Raw.class.php
@@ -24,7 +24,8 @@
if (empty($type))
return;
- $autotimer = new GitPHP_DebugAutoLog();
+ if (GitPHP_DebugLog::GetInstance()->GetEnabled())
+ $autotimer = new GitPHP_DebugAutoLog();
$refs = array();