Import changes from upstream to make icingaweb2 work with php 7.4
Approved by: lme (maintainer) Obtained from: Upstream repository head
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
PORTNAME= icingaweb2
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.7.3
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= net-mgmt www
|
||||
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
|
||||
|
||||
|
||||
44
net-mgmt/icingaweb2/files/patch-library_Icinga_Web_View.php
Normal file
44
net-mgmt/icingaweb2/files/patch-library_Icinga_Web_View.php
Normal file
@@ -0,0 +1,44 @@
|
||||
--- library/Icinga/Web/View.php.orig 2019-10-18 05:39:24 UTC
|
||||
+++ library/Icinga/Web/View.php
|
||||
@@ -60,13 +60,6 @@ class View extends Zend_View_Abstract
|
||||
const CHARSET = 'UTF-8';
|
||||
|
||||
/**
|
||||
- * Flag to register stream wrapper
|
||||
- *
|
||||
- * @var bool
|
||||
- */
|
||||
- private $useViewStream = false;
|
||||
-
|
||||
- /**
|
||||
* Registered helper functions
|
||||
*/
|
||||
private $helperFunctions = array();
|
||||
@@ -86,13 +79,6 @@ class View extends Zend_View_Abstract
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
- $this->useViewStream = (bool) ini_get('short_open_tag') ? false : true;
|
||||
- if ($this->useViewStream) {
|
||||
- if (!in_array('zend.view', stream_get_wrappers())) {
|
||||
- stream_wrapper_register('zend.view', '\Icinga\Web\ViewStream');
|
||||
- }
|
||||
- }
|
||||
-
|
||||
$config['helperPath']['Icinga\\Web\\View\\Helper\\'] = Icinga::app()->getLibraryDir('Icinga/Web/View/Helper');
|
||||
|
||||
parent::__construct($config);
|
||||
@@ -258,11 +244,8 @@ class View extends Zend_View_Abstract
|
||||
// Exporting global variables to view scripts:
|
||||
$$k = $v;
|
||||
}
|
||||
- if ($this->useViewStream) {
|
||||
- include 'zend.view://' . func_get_arg(0);
|
||||
- } else {
|
||||
- include func_get_arg(0);
|
||||
- }
|
||||
+
|
||||
+ include func_get_arg(0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,18 @@
|
||||
--- library/vendor/Zend/Registry.php.orig 2019-10-18 05:39:24 UTC
|
||||
+++ library/vendor/Zend/Registry.php
|
||||
@@ -190,15 +190,4 @@ class Zend_Registry extends ArrayObject
|
||||
parent::__construct($array, $flags);
|
||||
}
|
||||
|
||||
- /**
|
||||
- * @param string $index
|
||||
- * @returns mixed
|
||||
- *
|
||||
- * Workaround for http://bugs.php.net/bug.php?id=40442 (ZF-960).
|
||||
- */
|
||||
- public function offsetExists($index)
|
||||
- {
|
||||
- return array_key_exists($index, $this);
|
||||
- }
|
||||
-
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- library/vendor/lessphp/lessc.inc.php.orig 2019-10-18 05:39:24 UTC
|
||||
+++ library/vendor/lessphp/lessc.inc.php
|
||||
@@ -662,7 +662,7 @@ class lessc {
|
||||
|
||||
// check for a rest
|
||||
$last = end($args);
|
||||
- if ($last[0] == "rest") {
|
||||
+ if (is_array($last) && $last[0] == "rest") {
|
||||
$rest = array_slice($orderedValues, count($args) - 1);
|
||||
$this->set($last[1], $this->reduce(array("list", " ", $rest)));
|
||||
}
|
||||
Reference in New Issue
Block a user