diff -Nru icingaweb2-2.4.1/debian/changelog icingaweb2-2.4.1/debian/changelog --- icingaweb2-2.4.1/debian/changelog 2017-01-20 07:24:33.000000000 -0600 +++ icingaweb2-2.4.1/debian/changelog 2020-01-08 18:53:31.000000000 -0600 @@ -1,3 +1,12 @@ +icingaweb2 (2.4.1-1ubuntu0.1) bionic; urgency=medium + + * Backport "Correct interfaces to conform to PHP 7.2+" (72ec132f) from + upstream and `quilt refresh` it to apply without fuzz. + * Backport "Add upstream patch for PHP 7.2 support." from 2.6.2-3 + (LP: 1769890). Thanks Bas Couwenberg . + + -- Richard Laager Wed, 08 Jan 2020 18:53:31 -0600 + icingaweb2 (2.4.1-1) unstable; urgency=medium * [21444ed] Add patch 10_revert_dompdf_update diff -Nru icingaweb2-2.4.1/debian/patches/0001-Correct_interfaces_to_conform_to_PHP_7.2.patch icingaweb2-2.4.1/debian/patches/0001-Correct_interfaces_to_conform_to_PHP_7.2.patch --- icingaweb2-2.4.1/debian/patches/0001-Correct_interfaces_to_conform_to_PHP_7.2.patch 1969-12-31 18:00:00.000000000 -0600 +++ icingaweb2-2.4.1/debian/patches/0001-Correct_interfaces_to_conform_to_PHP_7.2.patch 2020-01-08 18:52:35.000000000 -0600 @@ -0,0 +1,62 @@ +From 72ec132f25c868d9510e6d36a2d5c92fc8dd59d1 Mon Sep 17 00:00:00 2001 +From: "Alexander A. Klimov" +Date: Thu, 14 Dec 2017 17:23:37 +0100 +Subject: [PATCH] Correct interfaces to conform to PHP 7.2+ + +--- + library/Icinga/Authentication/User/DbUserBackend.php | 4 ++-- + .../Icinga/Authentication/UserGroup/DbUserGroupBackend.php | 4 ++-- + library/Icinga/Web/Form/Element/Note.php | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +--- a/library/Icinga/Authentication/User/DbUserBackend.php ++++ b/library/Icinga/Authentication/User/DbUserBackend.php +@@ -128,7 +128,7 @@ + * @param string $table + * @param array $bind + */ +- public function insert($table, array $bind) ++ public function insert($table, array $bind, array $types = array()) + { + $this->requireTable($table); + $bind['created_at'] = date('Y-m-d H:i:s'); +@@ -149,7 +149,7 @@ + * @param array $bind + * @param Filter $filter + */ +- public function update($table, array $bind, Filter $filter = null) ++ public function update($table, array $bind, Filter $filter = null, array $types = array()) + { + $this->requireTable($table); + $bind['last_modified'] = date('Y-m-d H:i:s'); +--- a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php ++++ b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php +@@ -130,7 +130,7 @@ + * @param string $table + * @param array $bind + */ +- public function insert($table, array $bind) ++ public function insert($table, array $bind, array $types = array()) + { + $bind['created_at'] = date('Y-m-d H:i:s'); + parent::insert($table, $bind); +@@ -143,7 +143,7 @@ + * @param array $bind + * @param Filter $filter + */ +- public function update($table, array $bind, Filter $filter = null) ++ public function update($table, array $bind, Filter $filter = null, array $types = array()) + { + $bind['last_modified'] = date('Y-m-d H:i:s'); + parent::update($table, $bind, $filter); +--- a/library/Icinga/Web/Form/Element/Note.php ++++ b/library/Icinga/Web/Form/Element/Note.php +@@ -48,7 +48,7 @@ + * + * @return bool Always true + */ +- public function isValid($value) ++ public function isValid($value, $context = null) + { + return true; + } diff -Nru icingaweb2-2.4.1/debian/patches/0001-Don-t-call-session_start-after-ini_set.patch icingaweb2-2.4.1/debian/patches/0001-Don-t-call-session_start-after-ini_set.patch --- icingaweb2-2.4.1/debian/patches/0001-Don-t-call-session_start-after-ini_set.patch 1969-12-31 18:00:00.000000000 -0600 +++ icingaweb2-2.4.1/debian/patches/0001-Don-t-call-session_start-after-ini_set.patch 2020-01-08 18:29:37.000000000 -0600 @@ -0,0 +1,91 @@ +Description: Don't call session_start() after ini_set() +Author: "Alexander A. Klimov" +Origin: https://github.com/Icinga/icingaweb2/pull/3315/commits/dadd2c80f6819111f25e3799c072ec39c991897e +Bug: https://github.com/Icinga/icingaweb2/issues/3185 + +--- a/library/Icinga/Web/Session.php ++++ b/library/Icinga/Web/Session.php +@@ -29,7 +29,7 @@ class Session + public static function create(BaseSession $session = null) + { + if ($session === null) { +- self::$session = new PhpSession(); ++ self::$session = PhpSession::create(); + } else { + self::$session = $session; + } +--- /dev/null ++++ b/library/Icinga/Web/Session/Php72Session.php +@@ -0,0 +1,37 @@ ++sessionName); ++ ++ $cookie = new Cookie('bogus'); ++ session_set_cookie_params( ++ 0, ++ $cookie->getPath(), ++ $cookie->getDomain(), ++ $cookie->isSecure(), ++ true ++ ); ++ ++ session_start(array( ++ 'use_cookies' => true, ++ 'use_only_cookies' => true, ++ 'use_trans_sid' => false ++ )); ++ } ++} +--- a/library/Icinga/Web/Session/PhpSession.php ++++ b/library/Icinga/Web/Session/PhpSession.php +@@ -38,6 +38,21 @@ class PhpSession extends Session + * + * @param array $options An optional array of ini options to set + * ++ * @return static ++ * ++ * @throws ConfigurationError ++ * @see http://php.net/manual/en/session.configuration.php ++ */ ++ public static function create(array $options = null) ++ { ++ return version_compare(PHP_VERSION, '7.2.0') < 0 ? new self($options) : new Php72Session($options); ++ } ++ ++ /** ++ * Create a new PHPSession object using the provided options (if any) ++ * ++ * @param array $options An optional array of ini options to set ++ * + * @throws ConfigurationError + * @see http://php.net/manual/en/session.configuration.php + */ +--- a/test/php/library/Icinga/Web/Session/PhpSessionTest.php ++++ b/test/php/library/Icinga/Web/Session/PhpSessionTest.php +@@ -13,7 +13,7 @@ class PhpSessionTest extends BaseTestCas + if (!is_writable('/tmp')) { + $this->markTestSkipped('Could not write to session directory'); + } +- return new PhpSession( ++ return PhpSession::create( + array( + 'use_cookies' => false, + 'save_path' => '/tmp', diff -Nru icingaweb2-2.4.1/debian/patches/series icingaweb2-2.4.1/debian/patches/series --- icingaweb2-2.4.1/debian/patches/series 2017-01-20 07:14:52.000000000 -0600 +++ icingaweb2-2.4.1/debian/patches/series 2020-01-08 18:52:15.000000000 -0600 @@ -1 +1,3 @@ 10_revert_dompdf_update +0001-Correct_interfaces_to_conform_to_PHP_7.2.patch +0001-Don-t-call-session_start-after-ini_set.patch