User tests: Successful: Unsuccessful:
When using the extract function in PHP you should always document what vars are being created, this is especially important when using IDE's and static analysis tools.
code review - dump $displayData if you wish and check
$params and $module are undefined in the method and IDEs struggle to understand what is happening
Better code quality
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
It more useful to have in the module layouts, in each tmpl/blabla.php Instead of Dispatcher.
Also $buttons not available for all modules, you probably have checked QuickIcon module.
what I did was run get_defined_vars and then document them...
"Global variables" is set here:
joomla-cms/libraries/src/Dispatcher/AbstractModuleDispatcher.php
Lines 109 to 118 in 1487477
There no "buttons" as you can see
But it exists in QuickIcon Dispatcher.
In fact my screenshot proves what I did, I did not use get_defined_vars I used dd($displayData)
Anyway, the only two that are needed to stop static analysis breaking are modules and params...
| Labels |
Added:
?
|
||
I have tested this item
I have tested this item
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
?
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-25 03:28:06 |
| Closed_By | ⇒ | bembelimen | |
| Labels |
Added:
?
|
||
Thx
I have tested this item✅ successfully on 1487477
Tested successfully in 4.0.6-dev using PHP 8.0.13.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36348.