Commit ad39f553 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Cast types to prevent strict type errors

parent 28d01cdb
Pipeline #9162 passed with stages
in 6 minutes and 32 seconds
......@@ -273,7 +273,7 @@ class ExtensionVersion
foreach ($currentCores as $version => $coreInfo) {
if (is_array($coreInfo) && ($coreInfo['active'] === true || $coreInfo['elts'] === true)) {
// Only use keys that represent a branch number
if (strpos($version, '.') && preg_match('/^(\d+)\.\d+$/', $version, $matches)) {
if (strpos((string)$version, '.') && preg_match('/^(\d+)\.\d+$/', $version, $matches)) {
$latestBranchVersion = $coreInfo['latest'];
} else {
// Manage core version without branch (>= 7 LTS)
......@@ -289,7 +289,7 @@ class ExtensionVersion
}
// Check the oldest active version
if (version_compare($version . '.0', $oldestSupportedCoreVersion, '<')) {
if (version_compare($version . '.0', (string)$oldestSupportedCoreVersion, '<')) {
$oldestSupportedCoreVersion = $version;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment