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

Validate minTimestamp parameter for Live.getLastVisitsDetails #18788

Closed
tsteur opened this issue Feb 14, 2022 · 0 comments · Fixed by #18791
Closed

Validate minTimestamp parameter for Live.getLastVisitsDetails #18788

tsteur opened this issue Feb 14, 2022 · 0 comments · Fixed by #18791
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Feb 14, 2022

Happened with PHP 8.

#0 plugins/Live/Model.php(636): date('Y-m-d H:i:s', '0 WAITFOR DELA...')\n#1 plugins/Live/Model.php(495): Piwik\Plugins\Live\Model->getWhereClauseAndBind('log_visit.idsit...', Array, Object(Piwik\Date), NULL, false, '0 WAITFOR DELA...')\n#2 plugins/Live/Model.php(78): Piwik\Plugins\Live\Model->makeLogVisitsQueryString('4', Object(Piwik\Date), NULL, false, 0, 101, false, '0 WAITFOR DELA...', '')\n#3 plugins/Live/API.php(363): Piwik\Plugins\Live\Model->queryLogVisits('4', 'range', 'last3', false, 0, 101, false, '0 WAITFOR DELA...', '', true)\n#4 plugins/Live/API.php(174): Piwik\Plugins\Live\API->loadLastVisitsDetailsFromDatabase('4', 'range', 'last3', false, 0, 100, '0 WAITFOR DELA...', '', false)\n#5 [internal function]: Piwik\Plugins\Live\API->getLastVisitsDetails('4', 'range', 'last3', false, false, '0 WAITFOR DELA...', false, false, false)\n#6 core/API/Proxy.php(244): call_user_func_array(Array, Array)\n#7 core/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}()\n#8 core/API/Proxy.php(335): Piwik\Context::executeWithQueryParameters(Array, Object(Closure))\n#9 core/API/Request.php(266): Piwik\API\Proxy->call('\\Piwik\\Plugins\\...', 'getLastVisitsDe...', Array)\n#10 plugins/API/Controller.php(46): Piwik\API\Request->process()\n#11 [internal function]: Piwik\Plugins\API\Controller->index()\n#12

URL: index.php

Referrer: index.php?module=CoreHome&action=index&idSite=4&period=day&date=yesterday

GET: {"filter_limit":"100"}

POST: {"token_auth":"XYZANONYMIZED","force_api_session":"1","period":"range","idSite":"4","segment":"","date":"last3","format":"json","showRawMetrics":"1","module":"API","method":"Live.getLastVisitsDetails","filter_limit":"100","showColumns":"latitude,longitude,actions,lastActionTimestamp,visitLocalTime,city,country,countryCode,referrerType,referrerName,referrerTypeName,browserIcon,operatingSystemIcon,deviceType,deviceModel,countryFlag,idVisit,actionDetails,continentCode,actions,searches,goalConversions,visitorId,userId","minTimestamp":"0 WAITFOR DELAY '0:0:5'"}

seems the issue is caused by ,"minTimestamp":"0 WAITFOR DELAY '0:0:5'"}

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels Feb 14, 2022
@tsteur tsteur added this to the Priority Backlog (Help wanted) milestone Feb 14, 2022
@sgiehl sgiehl self-assigned this Feb 14, 2022
@justinvelluppillai justinvelluppillai changed the title date(): Argument #2 ($timestamp) must be of type ?int, string given in Live/Model.php Validate minTimestamp parameter for Live.getLastVisitsDetails Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants