User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Fixed a failing strict comparison operator, which prevents parent recursive asset rule to work properly
self::$assetPermissionsParentIdMapping[$extensionName][$id] is the result of a database query, so the type of self::$assetPermissionsParentIdMapping[$extensionName][$id]->id is string.
$assetId if an integer, so the test result is false, but it should be true...
Not easy to test, as this parameters don't seem to be use directly in joomla core...
none
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
sure, i can change it to
(int) self::$assetPermissionsParentIdMapping[$extensionName][$id]->id, but does it really makes it more readable ? the variable name is so long, you don't really see the type casting.
sure, i can change it to
(int) self::$assetPermissionsParentIdMapping[$extensionName][$id]->id, but does it really makes it more readable ? the variable name is so long, you don't really see the type casting.
it a not only about readability, which i argue it is quite readable , it is not too long,
it will also make clear to people looking at the code in the future what the comparison does, thus avoid the bug being re-introduced by future modifications
All this critique about type casting and no follow on...
(Needs merge conflicts resolved)
there was no conflict, merging of staging branch went fine...
| Title |
|
||||||
I have tested this item
| Labels |
Removed:
J3 Issue
|
||
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
?
|
||
Finally a happy end. Thanks
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-12-05 22:47:45 |
| Closed_By | ⇒ | HLeithner |
IMO It would be better to set this more explicitly, I mean using
(int) $a !== $b. I know that does not change anything in php but for people it is more explicit.