Skip to content

Commit

Permalink
enum_exists may have been manually declared on lower PHP versions, us…
Browse files Browse the repository at this point in the history
…e strict PHP version check
  • Loading branch information
Slamdunk committed Feb 18, 2022
1 parent f60028e commit c78e051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DeepCopy/DeepCopy.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ private function recursiveCopy($var)
return $var;
}

// PHP 8.1 Enum
if (function_exists('enum_exists') && enum_exists($var::class)) {
// Enum
if (PHP_VERSION_ID >= 80100 && enum_exists($var::class)) {
return $var;
}

Expand Down

0 comments on commit c78e051

Please sign in to comment.