Skip to content

Commit

Permalink
FIX, replacing a deprecated class, since this statement doesn't need …
Browse files Browse the repository at this point in the history
…to exist.
  • Loading branch information
Nathan Glasl committed Jul 11, 2017
1 parent ca98461 commit 46f240e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Services/QueuedJobService.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ public function __construct()
{
// bind a shutdown function to process all 'immediate' queued jobs if needed, but only in CLI mode
if (Config::inst()->get(__CLASS__, 'use_shutdown_function') && Director::is_cli()) {
if (class_exists('PHPUnit_Framework_TestCase') && Controller::has_curr() && (Controller::curr() instanceof TestRunner)) {
// do NOTHING
} else {
register_shutdown_function(array($this, 'onShutdown'));
}
register_shutdown_function(array($this, 'onShutdown'));
}
if (Config::inst()->get('SilverStripe\\Control\\Email\\Email', 'queued_job_admin_email') == '') {
Config::modify()->set(
Expand Down

0 comments on commit 46f240e

Please sign in to comment.