Check: libraries/src/Layout/LayoutHelper.php
Line 57
* @param object $displayData Object which properties are used inside the layout file to build displayed output
$displayData should be declared as array
But it's declared as object
Labels |
Added:
?
|
Category | ⇒ | Code style Libraries |
Status | New | ⇒ | Information Required |
Most, if not all, core JLayouts use an object for $displayData. In the beginning of JLayout the documentation said "use an array". If I understand it correct, the object data is sent by reference, array data not.
e.g.
LayoutHelper::render('joomla.edit.title_alias', $this)
$form = $displayData->getForm();
Labels |
Added:
J3 Issue
|
@jooservices is this Issue solved by Comment of @schnuti?
Hi there
Sorry but i don't think so. Even in Joomla! we still have this "issue"
administrator/components/com_users/views/levels/tmpl/default.php
line 40
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false))); ?>
So, as you can see param 2 is array.
But inspect
JLayoutHelper::render
we have function
public static function render($layoutFile, $displayData = null, $basePath = '', $options = null)
and docblock is
- @param object $displayData Object which properties are used inside the layout file to build displayed output
So, I think issue still there.
@jooservices Thanks for Comment.
My comment was on the title of the issue. Object is valid as also array or string or null.
If someone wants to exchange Object with Data in a PR it would be neutral and correct.
Status | Information Required | ⇒ | Discussion |
Labels |
Added:
?
|
Category | Code style Libraries | ⇒ | Libraries |
Gotta love subtleties
Status | Discussion | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-06-02 17:08:44 |
Closed_By | ⇒ | Quy |
Status | Fixed in Code Base | ⇒ | Closed |
Closed_By | Quy | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/21071
Fixed in PR #21837
@Quy can you please have a Look?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21071.