Problem/Motivation

I'm subclassing TablefieldFormatter to customise the display of table cells. While running my changes through drupal-check, it claimed that it couldn't find the ModuleHandler property that gets used in the viewElements method. I can see the moduleHandler property being declared in the class, but case sensitivity seems to be the issue here.

Steps to reproduce

Run the module's codebase through drupal-check.

Proposed resolution

Change all references to $this->ModuleHandler to $this->moduleHandler to match the class property that gets declared.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
tablefield-module_handler.patch1.29 KBgeoffreyr

Comments

geoffreyr created an issue. See original summary.

karanpagare’s picture

Status: Needs review » Reviewed & tested by the community

Patch by @geoffreyr applies cleanly and all references to $this->ModuleHandler are changed to $this->moduleHandler. Not getting the drupal check error after applying the patch. Moving to RTBC

avpaderno’s picture

Category: Bug report » Task

This isn't a bug, since PHP is case-insensitive.

liam morland’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Related issues: +#3397688: PHP 8.2 has deprecated the creation of dynamic properties