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.
| Comment | File | Size | Author |
|---|---|---|---|
| tablefield-module_handler.patch | 1.29 KB | geoffreyr |
Comments
Comment #2
karanpagare commentedPatch 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
Comment #3
avpadernoThis isn't a bug, since PHP is case-insensitive.
Comment #4
liam morlandFixed in #3397688: PHP 8.2 has deprecated the creation of dynamic properties.