1
0
Fork 0

Merge pull request #226 from justinrainbow/bug_211

PHP 5.3.2 segmentation fault fix
pull/231/head
Jordi Boggiano 2012-01-19 07:38:32 -08:00
commit f6efa3aa24
1 changed files with 5 additions and 1 deletions

View File

@ -937,7 +937,11 @@ class Solver
$this->installedMap[$package->getId()] = $package; $this->installedMap[$package->getId()] = $package;
} }
if (version_compare(PHP_VERSION, '5.3.2', '>')) {
$this->decisionMap = new \SplFixedArray($this->pool->getMaxId() + 1); $this->decisionMap = new \SplFixedArray($this->pool->getMaxId() + 1);
} else {
$this->decisionMap = array_fill(0, $this->pool->getMaxId() + 1, 0);
}
foreach ($this->jobs as $job) { foreach ($this->jobs as $job) {
switch ($job['cmd']) { switch ($job['cmd']) {