TickTackk
Well-known member
- Affected version
- 2.1.7
Behind the scene,
Using
and dumping
and dumping
When using
and dumping
and dumping
The difference is big but I'm not entirely sure if this is even a bug or a feature? Shouldn't the
XF:FileCheck
entity is extended and it's results
getter as to mark certain files as "whitelisted". Using
setParams
PHP:
$fileCheck->clearCache('results');
$results = $fileCheck->results;
$reply->setParams([
'tab' => $tab,
'results' => $results
]);
$results
in controller shows this:
Code:
array(5) {
["missing"] => array(1) {
["Thanos/DidNothingWrong"] => array(0) {
}
}
["inconsistent"] => array(2) {
["XF"] => array(4) {
[0] => string(47) "js/vendor/codemirror/addon/edit/closetag.min.js"
[1] => string(52) "js/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js"
[2] => string(26) "src/XF/Entity/Template.php"
[3] => string(42) "src/XF/Repository/TemplateModification.php"
}
["Thanos/DidNothingWrong"] => array(3) {
[0] => string(63) "src/addons/Thanos/DidNothingWrong/Admin/Controller/Example.php"
[1] => string(53) "src/addons/Thanos/DidNothingWrong/Entity/Example.php"
[2] => string(61) "src/addons/Thanos/DidNothingWrong/Pub/Controller/Example.php"
}
}
["total_missing"] => int(0)
["total_inconsistent"] => int(7)
["total_checked"] => int(6996)
}
$results
in template it shows"
Code:
array(5) {
["missing"] => array(1) {
["Thanos/DidNothingWrong"] => array(1) {
[0] => string(64) "src/addons/Thanos/DidNothingWrong/_data/widget_positions.xml"
}
}
["inconsistent"] => array(2) {
["XF"] => array(4) {
[0] => string(47) "js/vendor/codemirror/addon/edit/closetag.min.js"
[1] => string(52) "js/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js"
[2] => string(26) "src/XF/Entity/Template.php"
[3] => string(42) "src/XF/Repository/TemplateModification.php"
}
["Thanos/DidNothingWrong"] => array(3) {
[0] => string(63) "src/addons/Thanos/DidNothingWrong/Admin/Controller/Example.php"
[1] => string(53) "src/addons/Thanos/DidNothingWrong/Entity/Example.php"
[2] => string(61) "src/addons/Thanos/DidNothingWrong/Pub/Controller/Example.php"
}
}
["total_missing"] => int(0)
["total_inconsistent"] => int(7)
["total_checked"] => int(6996)
}
When using
setParam
PHP:
$reply->setParam('tab', $tab);
$fileCheck->clearCache('results');
$results = $fileCheck->results;
$reply->setParam('results', $results);
and dumping
$results
in controller shows this:
Code:
array(5) {
["missing"] => array(1) {
["Thanos/DidNothingWrong"] => array(0) {
}
}
["inconsistent"] => array(2) {
["XF"] => array(4) {
[0] => string(47) "js/vendor/codemirror/addon/edit/closetag.min.js"
[1] => string(52) "js/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js"
[2] => string(26) "src/XF/Entity/Template.php"
[3] => string(42) "src/XF/Repository/TemplateModification.php"
}
["Thanos/DidNothingWrong"] => array(3) {
[0] => string(63) "src/addons/Thanos/DidNothingWrong/Admin/Controller/Example.php"
[1] => string(53) "src/addons/Thanos/DidNothingWrong/Entity/Example.php"
[2] => string(61) "src/addons/Thanos/DidNothingWrong/Pub/Controller/Example.php"
}
}
["total_missing"] => int(0)
["total_inconsistent"] => int(7)
["total_checked"] => int(6996)
}
$results
in template shows this:
Code:
array(5) {
["missing"] => array(1) {
["Thanos/DidNothingWrong"] => array(0) {
}
}
["inconsistent"] => array(2) {
["XF"] => array(4) {
[0] => string(47) "js/vendor/codemirror/addon/edit/closetag.min.js"
[1] => string(52) "js/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js"
[2] => string(26) "src/XF/Entity/Template.php"
[3] => string(42) "src/XF/Repository/TemplateModification.php"
}
["Thanos/DidNothingWrong"] => array(3) {
[0] => string(63) "src/addons/Thanos/DidNothingWrong/Admin/Controller/Example.php"
[1] => string(53) "src/addons/Thanos/DidNothingWrong/Entity/Example.php"
[2] => string(61) "src/addons/Thanos/DidNothingWrong/Pub/Controller/Example.php"
}
}
["total_missing"] => int(0)
["total_inconsistent"] => int(7)
["total_checked"] => int(6996)
}
The difference is big but I'm not entirely sure if this is even a bug or a feature? Shouldn't the
setParams
just call setParam
in a loop or something similar instead of trying to merge?
Last edited: