Skip to content

Conversation

@jh23453
Copy link
Contributor

@jh23453 jh23453 commented Mar 6, 2022

I got the message:
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
in /usr/share/ganglia-webfrontend/functions.php on line 732

This messages is likely new with php7.3. Will be an error with PHP8.
For details see https://wiki.php.net/rfc/continue_on_switch_deprecation

This in one small step to get ready for php8. See #361

I got the message:
PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
 in /usr/share/ganglia-webfrontend/functions.php on line 732

This messages is likely new with php7.3. Will be an error with PHP8.
For details see https://wiki.php.net/rfc/continue_on_switch_deprecation

This in one small step to get ready for php8. See ganglia#361
@jh23453
Copy link
Contributor Author

jh23453 commented Jul 21, 2022

I now think that the following change would be better (pseudo-patch):

  case "standard":
    // Does view have any items/graphs defined
-    if ( count($view['items']) == 0 ) {
+    if ( count($view['items']) != 0 ) {
-      continue;
-      // print "No graphs defined for this view. Please add some";
-    } else {
      // Loop through graph items
      foreach ($view['items'] as $item_id => $item) {

@zeekus zeekus mentioned this pull request Aug 22, 2023
@berlin2123
Copy link
Contributor

Thanks, this Warning is fixed now in PR #376, as the same in your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants