| @@ -25,11 +25,8 @@ | ||
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public static function action($version, $invokeable, $oldversion, $check) |
| 28 | 28 | { |
| 29 | - if (!version_compare($version, $oldversion, $check)) { | |
| 30 | - return false; | |
| 31 | - } | |
| 32 | 29 | $namespace = 'BitCode\BitForm\Core\Fallback'; |
| 33 | 30 | $invoke = explode('@', $invokeable); |
| 34 | 31 | if (is_array($invoke) && 2 === count($invoke)) { |
| 35 | 32 | $fileName = $invoke[0]; |
| @@ -36,9 +33,11 @@ | ||
| 36 | 33 | $method = $invoke[1]; |
| 37 | 34 | $class = $namespace . '\\' . $fileName; |
| 38 | 35 | if (class_exists($class) && method_exists($class, $method)) { |
| 39 | 36 | $invokeMethod = new ReflectionMethod($class, $method); |
| 40 | - $invokeMethod->invoke($invokeMethod->isStatic() ? null : new $class()); | |
| 37 | + if (version_compare($version, $oldversion, $check)) { | |
| 38 | + $invokeMethod->invoke($invokeMethod->isStatic() ? null : new $class()); | |
| 39 | + } | |
| 41 | 40 | } else { |
| 42 | 41 | return 'Method or class not exist'; |
| 43 | 42 | } |
| 44 | 43 | } else { |