-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update for PHP 8 #376
update for PHP 8 #376
Changes from all commits
30c412a
9267574
3790ca7
6c7513f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1820,7 +1820,7 @@ protected function parseFunction($in, $from, $to, $parsingParams = false, $curBl | |
if ($func === 'tif') { | ||
$params[] = $tokens; | ||
} | ||
$output = call_user_func_array($funcCompiler, $params); | ||
$output = call_user_func_array($funcCompiler, array_values($params)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix: PHP Fatal error: Uncaught Error: Unknown named parameter $* in /usr/share/ganglia/dwoo/Dwoo/Compiler.php:1823 Not sure if this would introduce a logic bug, but the web page looks normal. |
||
} else { | ||
array_unshift($params, '$this'); | ||
$params = self::implode_r($params); | ||
|
@@ -2527,7 +2527,7 @@ protected function parseOthers($in, $from, $to, $parsingParams = false, $curBloc | |
} | ||
|
||
$breaker = false; | ||
while (list($k,$char) = each($breakChars)) { | ||
foreach ( $breakChars as $k => $char ) { | ||
$test = strpos($substr, $char); | ||
if ($test !== false && $test < $end) { | ||
$end = $test; | ||
|
@@ -3041,7 +3041,7 @@ protected function mapParams(array $params, $callback, $callType=2, $map = null) | |
} | ||
|
||
// loops over the param map and assigns values from the template or default value for unset optional params | ||
while (list($k,$v) = each($map)) { | ||
foreach ( $map as $k => $v ) { | ||
if ($v[0] === '*') { | ||
// "rest" array parameter, fill every remaining params in it and then break | ||
if (count($ps) === 0) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,7 +350,7 @@ function Gmetad () { | |
} | ||
|
||
if ($debug) print "<br/>DEBUG: Creating parser\n"; | ||
if ( in_array($context, $SKIP_GMETAD_CONTEXTS) ) { | ||
if ( isset($context) && is_array($context) && isset($SKIP_GMETAD_CONTEXTS) && is_array($SKIP_GMETAD_CONTEXTS) && in_array($context, $SKIP_GMETAD_CONTEXTS) ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix: PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /usr/share/ganglia/ganglia.php:353 |
||
return TRUE; | ||
} | ||
$parser = xml_parser_create(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,7 +208,11 @@ | |
# above the image. Not easy with template blocks. | ||
$cols=5; | ||
$i = 0; | ||
$count=count($names); | ||
if (is_null($names)) { | ||
$count=0; | ||
} else { | ||
$count=count($names); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix: PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/share/ganglia/meta_view.php:211 |
||
while ($i < $count) | ||
{ | ||
$snapnames = ""; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix: PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /usr/share/ganglia/cluster_view.php:597