mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
PHP 5.3.2 segmentation fault fix
For some reason, using the SqlFixedArray causes a Segmentation Fault during an install or update. Changing to a simple array fixes this issue, but in turn uses more memory. Which is why there is the version test.
This commit is contained in:
parent
4dee2528e9
commit
7eda0a8823
1 changed files with 5 additions and 1 deletions
|
@ -937,7 +937,11 @@ class Solver
|
|||
$this->installedMap[$package->getId()] = $package;
|
||||
}
|
||||
|
||||
$this->decisionMap = new \SplFixedArray($this->pool->getMaxId() + 1);
|
||||
if (version_compare(PHP_VERSION, '5.3.2', '>')) {
|
||||
$this->decisionMap = new \SplFixedArray($this->pool->getMaxId() + 1);
|
||||
} else {
|
||||
$this->decisionMap = array_fill(0, $this->pool->getMaxId() + 1, 0);
|
||||
}
|
||||
|
||||
foreach ($this->jobs as $job) {
|
||||
switch ($job['cmd']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue