Skip to content

Commit

Permalink
Merge pull request composer#226 from justinrainbow/bug_211
Browse files Browse the repository at this point in the history
PHP 5.3.2 segmentation fault fix
  • Loading branch information
Seldaek committed Jan 19, 2012
2 parents 360f31d + c6badf6 commit a40f57e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Composer/DependencyResolver/Solver.php
Expand Up @@ -937,7 +937,11 @@ public function solve(Request $request)
$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']) {
Expand Down

0 comments on commit a40f57e

Please sign in to comment.