Show defaulted version if phpversion() returns nothing, fixes #2313
parent
3da05c68f9
commit
cc37e4b0b8
|
@ -84,7 +84,7 @@ class Problem
|
|||
// handle php extensions
|
||||
if (0 === stripos($job['packageName'], 'ext-')) {
|
||||
$ext = substr($job['packageName'], 4);
|
||||
$error = extension_loaded($ext) ? 'has the wrong version ('.phpversion($ext).') installed' : 'is missing from your system';
|
||||
$error = extension_loaded($ext) ? 'has the wrong version ('.(phpversion($ext) ?: '0').') installed' : 'is missing from your system';
|
||||
|
||||
return "\n - The requested PHP extension ".$job['packageName'].$this->constraintToText($job['constraint']).' '.$error.'.';
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ class Rule
|
|||
// handle php extensions
|
||||
if (0 === strpos($targetName, 'ext-')) {
|
||||
$ext = substr($targetName, 4);
|
||||
$error = extension_loaded($ext) ? 'has the wrong version ('.phpversion($ext).') installed' : 'is missing from your system';
|
||||
$error = extension_loaded($ext) ? 'has the wrong version ('.(phpversion($ext) ?: '0').') installed' : 'is missing from your system';
|
||||
|
||||
$text .= ' -> the requested PHP extension '.$ext.' '.$error.'.';
|
||||
} elseif (0 === strpos($targetName, 'lib-')) {
|
||||
|
|
Loading…
Reference in New Issue