]> granicus.if.org Git - php/commitdiff
fix error on call to getValidationWarnings() on wrong variable
authorGreg Beaver <cellog@php.net>
Sat, 5 Nov 2005 18:24:20 +0000 (18:24 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 5 Nov 2005 18:24:20 +0000 (18:24 +0000)
pear/PEAR/Installer.php

index 1e97b6c57507ba79049dc8e19c4766c01f8a5a06..978912c3384ffffdd19b00e7fc113d7cb7c0d558 100644 (file)
@@ -885,10 +885,12 @@ class PEAR_Installer extends PEAR_Downloader
         $p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING);
         PEAR::staticPopErrorHandling();
         if (PEAR::isError($p)) {
-            foreach ($pkg->getValidationWarnings(true) as $err) {
-                $loglevel = $err['level'] == 'error' ? 0 : 1;
-                if (!isset($this->_options['soft'])) {
-                    $this->log($loglevel, ucfirst($err['level']) . ': ' . $err['message']);
+            if (is_array($p->getUserInfo())) {
+                foreach ($p->getUserInfo() as $err) {
+                    $loglevel = $err['level'] == 'error' ? 0 : 1;
+                    if (!isset($this->_options['soft'])) {
+                        $this->log($loglevel, ucfirst($err['level']) . ': ' . $err['message']);
+                    }
                 }
             }
             return $this->raiseError('Installation failed: invalid package file');