Skip to content

Commit 35e1d3e

Browse files
authored
[5.2] Invalid pass-by-reference usage (joomla#41971)
1 parent f2e0cd0 commit 35e1d3e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

administrator/components/com_menus/src/Model/MenuModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected function populateState()
125125
*
126126
* @since 1.6
127127
*/
128-
public function &getItem($itemId = null)
128+
public function getItem($itemId = null)
129129
{
130130
$itemId = (!empty($itemId)) ? $itemId : (int) $this->getState('menu.id');
131131

administrator/components/com_messages/src/Model/ConfigModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function populateState()
5757
*
5858
* @since 1.6
5959
*/
60-
public function &getItem()
60+
public function getItem()
6161
{
6262
$item = new CMSObject();
6363
$userid = (int) $this->getState('user.id');

administrator/components/com_modules/src/Model/PositionsModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function getItems()
110110
->bind(':clientid', $clientId, ParameterType::INTEGER);
111111

112112
if ($search) {
113-
$search = '%' . str_replace(' ', '%', trim($search), true) . '%';
113+
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
114114
$query->where($db->quoteName('position') . ' LIKE :position')
115115
->bind(':position', $search);
116116
}

administrator/components/com_templates/src/Model/TemplateModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ protected function populateState()
625625
*
626626
* @since 1.6
627627
*/
628-
public function &getTemplate()
628+
public function getTemplate()
629629
{
630630
if (empty($this->template)) {
631631
$pk = (int) $this->getState('extension.id');

0 commit comments

Comments
 (0)