Skip to content

Commit b507eee

Browse files
committed
Merge pull request #67 from stof/patch-2
Fixed the installer when running it with PHP 5.2
2 parents 853fc8a + 9fa2951 commit b507eee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

web/installer

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,12 @@ function installComposer($version, $installDir, $filename, $quiet, $disableTls,
378378
if (!$home) {
379379
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
380380
if (!getenv('APPDATA')) {
381-
throw new \RuntimeException('The APPDATA or COMPOSER_HOME environment variable must be set for composer to install correctly');
381+
throw new RuntimeException('The APPDATA or COMPOSER_HOME environment variable must be set for composer to install correctly');
382382
}
383383
$home = strtr(getenv('APPDATA'), '\\', '/') . '/Composer';
384384
} else {
385385
if (!getenv('HOME')) {
386-
throw new \RuntimeException('The HOME or COMPOSER_HOME environment variable must be set for composer to install correctly');
386+
throw new RuntimeException('The HOME or COMPOSER_HOME environment variable must be set for composer to install correctly');
387387
}
388388
$home = rtrim(getenv('HOME'), '/') . '/.composer';
389389
}
@@ -399,7 +399,7 @@ function installComposer($version, $installDir, $filename, $quiet, $disableTls,
399399
restore_error_handler();
400400

401401
if (!$write) {
402-
throw new \RuntimeException('Unable to write bundled cacert.pem to: '.$target);
402+
throw new RuntimeException('Unable to write bundled cacert.pem to: '.$target);
403403
}
404404
$cafile = $target;
405405
}
@@ -641,7 +641,7 @@ class HttpClient {
641641
} elseif ($cafile) {
642642
$options['ssl']['cafile'] = $cafile;
643643
} else {
644-
throw new \RuntimeException('A valid cafile could not be located automatically.');
644+
throw new RuntimeException('A valid cafile could not be located automatically.');
645645
}
646646

647647
/**
@@ -689,7 +689,7 @@ class HttpClient {
689689
$proxyURL = str_replace(array('http://', 'https://'), array('tcp://', 'ssl://'), $proxyURL);
690690

691691
if (0 === strpos($proxyURL, 'ssl:') && !extension_loaded('openssl')) {
692-
throw new \RuntimeException('You must enable the openssl extension to use a proxy over https');
692+
throw new RuntimeException('You must enable the openssl extension to use a proxy over https');
693693
}
694694

695695
$options['http'] = array(

0 commit comments

Comments
 (0)