# T32219 : can not use pathinfo() on URLs since slashes do not match
$matches = [];
-$ext = 'php';
$path = '/';
foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
- if ( !preg_match( '/\.(php5?)$/', $part, $matches ) ) {
+ if ( !preg_match( '/\.(php)$/', $part, $matches ) ) {
$path .= "$part/";
} else {
- $ext = $matches[1] == 'php5' ? 'php5' : 'php';
break;
}
}
[
'wgVersion' => ( isset( $wgVersion ) ? $wgVersion : 'VERSION' ),
'path' => $path,
- 'ext' => $ext,
'localSettingsExists' => file_exists( MW_CONFIG_FILE ),
'installerStarted' => $installerStarted
]