Check method exists prior to calling meetsRequirements

As Grav might not yet have been updated
This commit is contained in:
Flavio Copes
2015-12-19 20:21:10 +01:00
parent 3af4494d9b
commit db0227320a

View File

@@ -179,7 +179,7 @@ class Gpm
return false;
}
if (!$upgrader->meetsRequirements()) {
if (method_exists($upgrader, 'meetsRequirements') && !$upgrader->meetsRequirements()) {
$error = [];
$error[] = '<p>Grav has increased the minimum PHP requirement.<br />';
$error[] = 'You are currently running PHP <strong>' . PHP_VERSION .'</strong>';