Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21581

Using '$this' in static context

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.28
    • Fix Version/s: None
    • Component/s: Import
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      Hi!

      In this method

      CRM/Contact/Import/ImportJob.php#L419

      static method getIncompleteImportTables uses variable $this:

      {{ public static function getIncompleteImportTables() {}}
      ...
      {{ if (!$this->isComplete($importTable)) {}}
      ...
      {{ }}}

      so this can lead to fatal error (using $this when not in object context )

       

      This possible defect found by AppChecker

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              AppChecker AppChecker
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: