summaryrefslogtreecommitdiffstats
path: root/1.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-11-18 14:39:41 +0100
committerRemi Collet <remi@remirepo.net>2019-11-18 14:39:41 +0100
commit3f4303fac179113cbb2e01993c43aceba4a6a4ce (patch)
treeab4e7d4608b34e89a74e5f3f318f39ae81bd3c2b /1.patch
parent0c6340e6b42c4bc84109fe4f3c68aa6dabe2ec1a (diff)
- Fix FTBFS from Koschei, add patch for PHP 7.4 from
https://github.com/horde/Service_Weather/pull/1 - use range dependencies
Diffstat (limited to '1.patch')
-rw-r--r--1.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/1.patch b/1.patch
new file mode 100644
index 0000000..dd4d677
--- /dev/null
+++ b/1.patch
@@ -0,0 +1,57 @@
+From 9b64ea49884ccc67eb00803ea8a8d20bdd71d696 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 18 Nov 2019 14:26:48 +0100
+Subject: [PATCH] fix phplint warnings
+
+---
+ lib/Horde/Service/Weather.php | 6 +++---
+ lib/Horde/Service/Weather/Parser/Metar.php | 8 ++++----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/lib/Horde/Service/Weather.php b/lib/Horde/Service/Weather.php
+index 0a9d44f..2a7c423 100644
+--- a/lib/Horde/Service/Weather.php
++++ b/lib/Horde/Service/Weather.php
+@@ -351,8 +351,8 @@ public static function convertTemperature($temperature, $from, $to)
+ return $temperature;
+ }
+
+- $from = strtolower($from{0});
+- $to = strtolower($to{0});
++ $from = strtolower($from[0]);
++ $to = strtolower($to[0]);
+
+ $result = array(
+ 'f' => array(
+@@ -368,4 +368,4 @@ public static function convertTemperature($temperature, $from, $to)
+ return $result[$from][$to];
+ }
+
+-}
+\ No newline at end of file
++}
+diff --git a/lib/Horde/Service/Weather/Parser/Metar.php b/lib/Horde/Service/Weather/Parser/Metar.php
+index 570f6c2..61bf73d 100644
+--- a/lib/Horde/Service/Weather/Parser/Metar.php
++++ b/lib/Horde/Service/Weather/Parser/Metar.php
+@@ -545,10 +545,10 @@ protected function _parse(array $data)
+ 'presschng' => Horde_Service_Weather::convertPressure($result[2] / 10, 'hpa', $this->_unitMap[self::UNIT_KEY_PRESSURE]),
+ 'description' => ($result[1] >= 0 && $result[1] <=3)
+ ? Horde_Service_Weather_Translation::t('Rising')
+- : ($result[1] == 4)
++ : (($result[1] == 4)
+ ? Horde_Service_Weather_Translation::t('Steady')
+- : ($result[1] > 4)
+- ? Horde_Service_Weather_Translation::t('Falling') : ''
++ : (($result[1] > 4)
++ ? Horde_Service_Weather_Translation::t('Falling') : ''))
+ );
+ unset($metarCode['3hpresstend']);
+ break;
+@@ -637,4 +637,4 @@ protected function _getRemarks()
+ );
+ }
+
+-}
+\ No newline at end of file
++}