Skip to content

Commit

Permalink
Merge pull request #675 from FR6/patch-2
Browse files Browse the repository at this point in the history
Added a verification that the Yii class exists
  • Loading branch information
freekmurze authored Apr 8, 2022
2 parents 98bfd85 + bddde95 commit ef5836b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ function ray(...$args)
}
}

if (class_exists(CraftRay::class)) {
if (class_exists(CraftRay::class) && class_exists(Yii::class)) {
return Yii::$container->get(CraftRay::class)->send(...$args);
}

if (class_exists(YiiRay::class)) {
if (class_exists(YiiRay::class) && class_exists(Yii::class)) {
return Yii::$container->get(YiiRay::class)->send(...$args);
}

Expand Down

0 comments on commit ef5836b

Please sign in to comment.