Skip to content

strpos(): Argument #1 ($haystack) must be of type string, array given Range.php #18794

@tsteur

Description

@tsteur

Error: {"message":"strpos(): Argument #1 ($haystack) must be of type string, array given","file":"/core/Period/Range.php","line":525,"request_id":"a48e4","backtrace":" on /core/Period/Range.php(525)\n#0 /core/Period/Range.php(525): strpos(Array, '-')\n#1 /plugins/ImageGraph/ImageGraph.php(92): Piwik\Period\Range::getRelativeToEndDate('day', 'last30', Array, Object(Piwik\Site))\n#2 [internal function]: Piwik\Plugins\ImageGraph\ImageGraph->getReportMetadata(Array, Array)\n#3 /core/EventDispatcher.php(141): call_user_func_array(Array, Array)\n#4 /core/Piwik.php(845): Piwik\EventDispatcher->postEvent('API.getReportMe...', Array, false, Array)\n#5 /plugins/API/ProcessedReport.php(221): Piwik\Piwik::postEvent('API.getReportMe...', Array)\n#6 /plugins/API/API.php(276): Piwik\Plugins\API\ProcessedReport->getReportMetadata('1', 'day', Array, false, false)\n#7 /core/Plugin/Controller.php(429): Piwik\Plugins\API\API->getReportMetadata('1', 'day', Array)\n#8 /plugins/VisitsSummary/Controller.php(121): Piwik\Plugin\Controller->getLastUnitGraphAcrossPlugins('VisitsSummary', 'getEvolutionGra...', false, Array, 'This is an over...')\n#9 [internal function]: Piwik\Plugins\VisitsSummary\Controller->getEvolutionGraph()\n#10 /core/FrontController.php(623): call_user_func_array(Array, Array)\n#11 /core/FrontController.php(168): Piwik\FrontController->doDispatch('VisitsSummary', 'getEvolutionGra...', Array)

URL: https://demo.matomo.cloud/index.php?action=getEvolutionGraph&date%5B0%5D=exp&date%5B1%5D=%3D1%E9%8E%88%27%22%5C%28&disableLink=0&forceView=1&idSite=1&module=VisitsSummary&period=day&viewDataTable=graphEvolution&widget=1

Referrer: https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday

GET: {"action":"getEvolutionGraph","date":["exp","=1\u9388'"\("],"disableLink":"0","forceView":"1","idSite":"1","module":"VisitsSummary","period":"day","viewDataTable":"graphEvolution","widget":"1"}

Happens on PHP 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor errors / faults / flaws / inconsistencies etc.Help wantedBeginner friendly issues or issues where we'd highly appreciate community's help and involvement.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions