"$this" can no longer be used in a plain function or method since PHP 7.1

Created on 24 January 2023, almost 2 years ago
Updated 1 May 2023, over 1 year ago

Problem/Motivation

Latest version of this module is not compatible with PHP 8.1

FILE: /app/docroot/modules/contrib/addtocal/addtocal.api.php
-----------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------
42 | ERROR | "$this" can no longer be used in a plain function or method since PHP 7.1.
43 | ERROR | "$this" can no longer be used in a plain function or method since PHP 7.1.

Steps to reproduce

phpcs -p docroot/modules/contrib/addtocal --standard=PHPCompatibility --runtime-set testVersion 8.1 --extensions=php,module,install,inc

Proposed resolution

📌 Task
Status

Needs review

Component

Code

Created by

🇮🇳India Nilesh Chhantbar

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024