diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 38d940e..a77c1ad 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1701,7 +1701,7 @@ function install_get_localization_release($version = VERSION) { // Check if version is a regular stable release (no extra_text: 'rc', 'beta', // 'dev', etc.) - if (empty($info['extra_text'])) { + if (!isset($info['extra_text'])) { // Potential translation release to use is the same as the version. $releases[] = array( 'core' => $info['major'] . '.x', @@ -1781,31 +1781,26 @@ function install_get_localization_release($version = VERSION) { * - extra_number: The number part of "extra" (e.g., "2"). */ function _install_get_version_info($version) { + $info = array(); preg_match('/ ( - ([0-9]+) # Major release number. + (?P[0-9]+) # Major release number. \. # . - ([0-9]+) # Minor release number. + (?P[0-9]+) # Minor release number. ) # ( # - # - separator for "extra" verion information. - ( # - ([a-z]+) # Release extra text (e.g., "alpha"). - ([0-9]*) # Release extra number (no separator between text and number). + (?P # + (?P[a-z]+) # Release extra text (e.g., "alpha"). + (?P[0-9]*) # Release extra number (no separator between text and number). ) # | # OR no "extra" information. ) /sx', $version, $matches); - $info['major'] = $matches[2]; - $info['minor'] = $matches[3]; - $info['extra'] = isset($matches[5]) ? $matches[5] : ''; - $info['extra_text'] = isset($matches[6]) ? $matches[6] : ''; - $info['extra_number'] = isset($matches[7]) ? $matches[7] : ''; - - return $info; + return $matches; } /**