Permalink
Browse files

- Fix #738.

  • Loading branch information...
1 parent 230d459 commit 2541f108a10ec1d755fa5f2178b82b2e92c7ca1b @sebastianbergmann committed Mar 6, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 PHPUnit/Framework/TestCase.php
@@ -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);
}
}
@@ -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();
}
}

0 comments on commit 2541f10

Please sign in to comment.