if ((string) $module->id === $id) { // Found it return $module; }
must cast the incoming "id" because $module->id is an integer
if ($module->id === (int)$id) { // Found it return $module; }
Labels |
Added:
No Code Attached Yet
|
$id
is parsed here:
joomla-cms/plugins/content/loadmodule/src/Extension/LoadModule.php
Lines 164 to 180 in 78d2b75
$match[1]
is string type.
array:2 [
0 => "{loadmoduleid 134}"
1 => "134"
]
The docblock is correct.
Please do something with wood.
Am 29. April 2025 19:09:40 UTC schrieb Quy Ton @.***>:
QuyTon left a comment (#45408)
$id
is parsed here:joomla-cms/plugins/content/loadmodule/src/Extension/LoadModule.php
Lines 164 to 180 in 78d2b75
$match[1]
is string type.array:2 [ 0 => "{loadmoduleid 134}" 1 => "134" ]
The docblock is correct.
--
Reply to this email directly or view it on GitHub:
#45408 (comment)
You are receiving this because you authored the thread.Message ID: @.***>
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-04-29 19:38:22 |
Closed_By | ⇒ | QuyTon |
Closing as expected behavior. Thanks for reporting.
Please read the docblock,
$id
is a string, thus,$module->id
is casted to be a string.