svn: /pear/pear-core/tags/PEAR-1.9.2/PEAR/ Downloader.php

From: Date: Fri, 25 Feb 2011 23:25:02 +0000
Subject: svn: /pear/pear-core/tags/PEAR-1.9.2/PEAR/ Downloader.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9741@lists.php.net to get a copy of this message
dufuz Fri, 25 Feb 2011 23:25:02 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=308691 Log: Fixed Bug #17781: invalid argument warning on foreach due to an empty optional dependencie [dufuz] # Backported from trunk Bug: http://pear.php.net/bugs/17781 (unknown) Changed paths: U pear/pear-core/tags/PEAR-1.9.2/PEAR/Downloader.php Modified: pear/pear-core/tags/PEAR-1.9.2/PEAR/Downloader.php =================================================================== --- pear/pear-core/tags/PEAR-1.9.2/PEAR/Downloader.php 2011-02-25 23:23:08 UTC (rev 308690) +++ pear/pear-core/tags/PEAR-1.9.2/PEAR/Downloader.php 2011-02-25 23:25:02 UTC (rev 308691) @@ -553,7 +553,7 @@ } $failed = false; - if (isset($deps['required'])) { + if (isset($deps['required']) && is_array($deps['required'])) { foreach ($deps['required'] as $type => $dep) { // note: Dependency2 will never return a PEAR_Error if ignore-errors // is specified, so soft is needed to turn off logging @@ -587,7 +587,7 @@ } } - if (isset($deps['optional'])) { + if (isset($deps['optional']) && is_array($deps['optional'])) { foreach ($deps['optional'] as $type => $dep) { if (!isset($dep[0])) { if (PEAR::isError($e =

« previous php.pear.core (#9741) next »