Преглед изворни кода

! Some of the values used on sm.org in the past have not been entirely legal but due to the complexities of getting that sorted out, it's better that we fix it softly here as well just in case.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer пре 10 година
родитељ
комит
0e5585057b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Sources/Subs-Package.php

+ 1 - 1
Sources/Subs-Package.php

@@ -1554,7 +1554,7 @@ function compareVersions($version1, $version2)
 
 		// Build an array of parts.
 		$versions[$id] = array(
-			'major' => (int) $parts[1],
+			'major' => !empty($parts[1]) ? (int) $parts[1] : 0,
 			'minor' => !empty($parts[2]) ? (int) $parts[2] : 0,
 			'patch' => !empty($parts[3]) ? (int) $parts[3] : 0,
 			'type' => empty($parts[4]) ? 'stable' : $parts[4],