Skip to content

Commit

Permalink
Support for Craft 2.6.2951
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Nov 22, 2016
1 parent d484fac commit 24484ea
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions workflow/WorkflowPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,15 @@ protected function defineSettings()
}

public function onBeforeInstall()
{
if (version_compare(craft()->getVersion(), '2.5', '<')) {
{
$version = craft()->getVersion();

// Craft 2.6.2951 deprecated `craft()->getBuild()`, so get the version number consistently
if (version_compare(craft()->getVersion(), '2.6.2951', '<')) {
$version = craft()->getVersion() . '.' . craft()->getBuild();
}

if (version_compare($version, '2.5', '<')) {
throw new Exception($this->getName() . ' requires Craft CMS 2.5+ in order to run.');
}
}
Expand Down

0 comments on commit 24484ea

Please sign in to comment.