Skip to content

Commit

Permalink
- Fix #738.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 6, 2009
1 parent 230d459 commit 2541f10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PHPUnit/Framework/TestCase.php
Expand Up @@ -650,7 +650,8 @@ public function runBare()
PHPUnit_Util_GlobalState::backupGlobals($this->backupGlobalsBlacklist);
}

if ($this->backupStaticAttributes === NULL || $this->backupStaticAttributes === TRUE) {
if (version_compare(PHP_VERSION, '5.3', '>') &&
($this->backupStaticAttributes === NULL || $this->backupStaticAttributes === TRUE)) {
PHPUnit_Util_GlobalState::backupStaticAttributes($this->backupStaticAttributesBlacklist);
}
}
Expand Down Expand Up @@ -720,7 +721,8 @@ public function runBare()
PHPUnit_Util_GlobalState::restoreGlobals($this->backupGlobalsBlacklist);
}

if ($this->backupStaticAttributes === NULL || $this->backupStaticAttributes === TRUE) {
if (version_compare(PHP_VERSION, '5.3', '>') &&
($this->backupStaticAttributes === NULL || $this->backupStaticAttributes === TRUE)) {
PHPUnit_Util_GlobalState::restoreStaticAttributes();
}
}
Expand Down

0 comments on commit 2541f10

Please sign in to comment.