? ? Failure

User tests: Successful: Unsuccessful:

avatar julienV
julienV
6 Jul 2017

Pull Request for Issue # .

Summary of Changes

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...

selection_168

Testing Instructions

Not easy to test, as this parameters don't seem to be use directly in joomla core...

Expected result

Actual result

Documentation Changes Required

none

avatar julienV julienV - open - 6 Jul 2017
avatar julienV julienV - change - 6 Jul 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jul 2017
Category Libraries
avatar csthomas
csthomas - comment - 7 Jul 2017

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.

avatar julienV
julienV - comment - 7 Jul 2017

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.

avatar julienV julienV - change - 7 Jul 2017
The description was changed
avatar julienV julienV - edited - 7 Jul 2017
avatar ggppdk
ggppdk - comment - 7 Jul 2017

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

avatar julienV
julienV - comment - 24 Jul 2017

@ggppdk i added the casting to int

avatar mbabker
mbabker - comment - 21 Jul 2018

All this critique about type casting and no follow on...

(Needs merge conflicts resolved)

avatar julienV
julienV - comment - 21 Jul 2018

there was no conflict, merging of staging branch went fine...

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[fix] fixed missing own asset rule for parent recursive get access rule
fixed missing own asset rule for parent recursive get access rule
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar SharkyKZ SharkyKZ - test_item - 14 Oct 2019 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 14 Oct 2019

I have tested this item successfully on fc4d255


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17009.

avatar Quy Quy - change - 8 Nov 2019
Labels Removed: J3 Issue
avatar Quy Quy - change - 8 Nov 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 8 Nov 2019

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17009.

avatar rdeutz rdeutz - change - 24 Nov 2019
Labels Added: ?
avatar HLeithner
HLeithner - comment - 5 Dec 2019

Finally a happy end. Thanks

avatar HLeithner HLeithner - close - 5 Dec 2019
avatar HLeithner HLeithner - merge - 5 Dec 2019
avatar HLeithner HLeithner - change - 5 Dec 2019
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

Add a Comment

Login with GitHub to post a comment