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
strtolower(): Argument #1 ($string) must be of type string, array given in Date.php #18639
Comments
@tsteur I would assume we have that problem at multiple other places as well. It's nowhere expected that |
I would first check if it's needed. If it can be done eg in I suppose the problem might be If we can avoid a global solution that be good as it gives us more flexibility and it could in theory cause regressions etc (although I doubt it would). It's hard to say though without looking too much into it. A global solution could potentially work as well though, it will I suppose only restrict from using |
The problem is, that there are many places where we call We could go through all usages of |
@sgiehl not 100% sure but from a quick test below change would probably already cover 90% of the cases with very little effort (the API already handles things well by the looks and does not result in fatal error):
Period might be bit different and might require 2 or 3 changes to cover most of the errors like below (although are likely quite a few more):
Generally sounds good though to add a |
right, so we want to add 2 functions Piwik::getDate() and Piwik::getPeriod() then replace those once. $date = Common::getRequestVar('date', 'today');
$period = Common::getRequestVar('period', 'day'); Also just checking do we have a param validator sth like this $validatedData = $request->validate([
'title' => ['required', 'unique:posts', 'max:255'],
'body' => ['required'],
]); |
We don't @peterhashair |
First problem:
Happens on
/index.php?action=index&date=yesterday&idSite=1&module=MultiSites&period[]=day
Second problem
Happens on
index.php?action=index&date[]=yesterday&idSite=1&module=MultiSites&period=day
Expected outcome
No fatal error
The text was updated successfully, but these errors were encountered: