Skip to content

Commit

Permalink
chore(7.4): Replace Object with SS_Object
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarter committed Jun 3, 2020
1 parent e9bc07c commit c91e8ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions _config.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

// Ensure compatibility with PHP 7.2 ("object" is a reserved word),
// with SilverStripe 3.6 (using Object) and SilverStripe 3.7 (using SS_Object)
if (!class_exists('SS_Object')) class_alias('Object', 'SS_Object');

if (($QUEUED_JOBS_DIR = basename(dirname(__FILE__))) != 'queuedjobs') {
die("The queued jobs module must be installed in /queuedjobs, not $QUEUED_JOBS_DIR");
}
2 changes: 1 addition & 1 deletion code/services/QueuedJobService.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ protected function restartStalledJob($stalledJob) {
protected function initialiseJob(QueuedJobDescriptor $jobDescriptor) {
// create the job class
$impl = $jobDescriptor->Implementation;
$job = Object::create($impl);
$job = SS_Object::create($impl);
/* @var $job QueuedJob */
if (!$job) {
throw new Exception("Implementation $impl no longer exists");
Expand Down

0 comments on commit c91e8ef

Please sign in to comment.