summaryrefslogtreecommitdiffstats
path: root/98.patch
diff options
context:
space:
mode:
Diffstat (limited to '98.patch')
-rw-r--r--98.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/98.patch b/98.patch
new file mode 100644
index 0000000..7b5fca2
--- /dev/null
+++ b/98.patch
@@ -0,0 +1,49 @@
+From d55d7d1b8756e5981d16852d0cd654cb27aff398 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv@gmail.com>
+Date: Tue, 27 Aug 2019 12:31:05 +0200
+Subject: [PATCH] Fix use of null/false as array
+
+---
+ PEAR/Command/Remote.php | 4 ++--
+ PEAR/DependencyDB.php | 4 +++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/PEAR/Command/Remote.php b/PEAR/Command/Remote.php
+index 706ac9eec..f2d82e8e5 100644
+--- a/PEAR/Command/Remote.php
++++ b/PEAR/Command/Remote.php
+@@ -222,7 +222,7 @@ function doRemoteInfo($command, $options, $params)
+ }
+
+ $installed = $reg->packageInfo($info['name'], null, $channel);
+- $info['installed'] = $installed['version'] ? $installed['version'] : '- no -';
++ $info['installed'] = $installed ? $installed['version'] : '- no -';
+ if (is_array($info['installed'])) {
+ $info['installed'] = $info['installed']['release'];
+ }
+@@ -351,7 +351,7 @@ function doListAll($command, $options, $params)
+
+ foreach ($available as $name => $info) {
+ $installed = $reg->packageInfo($name, null, $channel);
+- if (is_array($installed['version'])) {
++ if ($installed && is_array($installed['version'])) {
+ $installed['version'] = $installed['version']['release'];
+ }
+ $desc = $info['summary'];
+diff --git a/PEAR/DependencyDB.php b/PEAR/DependencyDB.php
+index 4f633ff1f..ad48a3626 100644
+--- a/PEAR/DependencyDB.php
++++ b/PEAR/DependencyDB.php
+@@ -216,9 +216,11 @@ function getDependentPackageDependencies(&$pkg)
+ if (is_object($pkg)) {
+ $channel = strtolower($pkg->getChannel());
+ $package = strtolower($pkg->getPackage());
+- } else {
++ } else if (is_array($pkg)) {
+ $channel = strtolower($pkg['channel']);
+ $package = strtolower($pkg['package']);
++ } else {
++ return false;
+ }
+
+ $depend = $this->getDependentPackages($pkg);