Skip to content

False Positive #297

@hheckner

Description

@hheckner

WP-Matomo Integration Version 1.0.26
Wordpress 5.8.1
PHP 7.3
PHP Checker: 1.5.2

FILE: /var/www/wordpress/wp-content/plugins/wp-piwik/classes/WP_Piwik.php

FOUND 1 ERROR AFFECTING 1 LINE

383 | ERROR | Using 'break' outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0

FILE: /var/www/wordpress/wp-content/plugins/wp-piwik/proxy/proxy.php

FOUND 1 ERROR AFFECTING 1 LINE

106 | ERROR | INI directive 'magic_quotes_runtime' is deprecated since PHP 5.3 and removed since PHP 5.4

Feedback from Matomo Integation:

<style> </style>
  Lukas Winkler Lukas Matomo Team Member September 29

Hi,

Could it be that the tool is giving a false alert, as unless I am missing something obvious here, the break is inside a loop.

github.com

braekling/WP-Matomo/blob/573d653aea3e99eee1a8516db20a9bfeca1da55f/classes/WP_Piwik.php#L380-L384

    
lang=EN style='background:#F9F9F9;mso-ansi-language:EN'><o:p> </o:p>
      <o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
          <o:p></o:p>
<![if !supportLists]>380. <![endif]>                                      foreach ($userRoles as $userRole)<o:p></o:p>
<![if !supportLists]>381. <![endif]><o:p> </o:p>
<![if !supportLists]>382. <![endif]><o:p> </o:p>
<o:p> </o:p>
<o:p> </o:p>
          <o:p></o:p>
<![if !supportLists]>383. <![endif]>                                              if (isset( $allowed[$userRole] ) && $allowed[$userRole]) {<o:p></o:p>
<![if !supportLists]>384. <![endif]><o:p> </o:p>
<![if !supportLists]>385. <![endif]><o:p> </o:p>
<o:p> </o:p>
<o:p> </o:p>
          <o:p></o:p>
<![if !supportLists]>386. <![endif]>                                                      $cap = 'read';<o:p></o:p>
<![if !supportLists]>387. <![endif]><o:p> </o:p>
<![if !supportLists]>388. <![endif]><o:p> </o:p>
<o:p> </o:p>
<o:p> </o:p>
          <o:p></o:p>
<![if !supportLists]>389. <![endif]>                                                      break;<o:p></o:p>
<![if !supportLists]>390. <![endif]><o:p> </o:p>
<![if !supportLists]>391. <![endif]><o:p> </o:p>
<o:p> </o:p>
<o:p> </o:p>
          <o:p></o:p>
<![if !supportLists]>392. <![endif]>                                              }<o:p></o:p>
<![if !supportLists]>393. <![endif]><o:p> </o:p>
<![if !supportLists]>394. <![endif]><o:p> </o:p>
<o:p> </o:p>
<o:p> </o:p>
      <o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
    <o:p></o:p>
<o:p> </o:p>
  <o:p></o:p>

But guessing by the fact that a lot of people (including me) are running the plugin on PHP 7 without issues for a long time now, I guess it isn’t an important issue that should stop you from upgrading.


Rufe das Thema auf oder antworte auf diese E-Mail, um zu antworten.

Um diese E-Mails abzubestellen, klicke hier.

                                                           

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions