Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various notices caused by invalid parameter values #13511

Merged
merged 4 commits into from Sep 30, 2018
Merged

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Sep 30, 2018

refs #13507

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Sep 30, 2018
@sgiehl sgiehl added this to the 3.6.1 milestone Sep 30, 2018
@@ -449,6 +449,10 @@ public function get($idSite, $period, $date, $segment = false, $columns = false)
*/
public function getRowEvolution($idSite, $period, $date, $apiModule, $apiAction, $label = false, $segment = false, $column = false, $language = false, $idGoal = false, $legendAppendMetric = true, $labelUseAbsoluteUrl = true, $idDimension = false)
{
// check if site exists
$idSite = (int) $idSite;
$site = new Site($idSite);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is really an issue, but someone could check if a site exists by querying this method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, nevermind, noticed Site will indirectly trigger a view access check.

@diosmosis diosmosis merged commit 019ce01 into 3.x-dev Sep 30, 2018
@diosmosis diosmosis deleted the fixnotices branch September 30, 2018 20:43
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
)

* Properly check dates used for period factory

* Properly check given idSite for rowevolution

* Improve example API to check given parameter type

* cast idSite parameter in ImageGraph API method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants