]> granicus.if.org Git - php/commitdiff
fix error message, it shouldn't attempt to display a version if none is installed
authorGreg Beaver <cellog@php.net>
Thu, 11 Dec 2003 23:55:03 +0000 (23:55 +0000)
committerGreg Beaver <cellog@php.net>
Thu, 11 Dec 2003 23:55:03 +0000 (23:55 +0000)
pear/PEAR/Dependency.php

index 985f0e2a2d5380c10528a20f58d8b0b51e84359a..1f42af48bfd122716ce4bd4c35c6f4b1ada6a747 100644 (file)
@@ -162,7 +162,10 @@ class PEAR_Dependency
                     $code = $this->codeFromRelation($relation, $version, $req, $opt);
                     if ($opt) {
                         $errmsg = "package `$name' version " . $this->signOperator($relation) .
-                            " $req is recommended to utilize some features.  Installed version is $version";
+                            " $req is recommended to utilize some features.";
+                        if ($version) {
+                            $errmsg .= "  Installed version is $version";
+                        }
                         return $code;
                     }
                     $errmsg = "requires package `$name' " .