Skip to content

Fix array to string conversion on event search - #23028

Merged
MorrisJobke merged 1 commit into
masterfrom
bugfix/noid/array-to-string-conversion-on-event-search
Oct 5, 2020
Merged

Fix array to string conversion on event search#23028
MorrisJobke merged 1 commit into
masterfrom
bugfix/noid/array-to-string-conversion-on-event-search

Conversation

@nickvergessen

@nickvergessennickvergessen commented Sep 24, 2020

Copy link
Copy Markdown
Member
{
"reqId": "nieyd2kcbYk5PfY5JctS",
"level": 3,
"time": "2020-09-24T10:48:21+00:00",
"remoteAddr": "85.195.247.3",
"user": "",
"app": "PHP",
"method": "GET",
"url": "/ocs/v2.php/search/providers/calendar/search?term=gal&from=…",
"message": "Array to string conversion at /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#81",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0",
"version": "20.0.0.7"
}

Values come from:

privatestatic$searchParameters = [
'ATTENDEE' => ['CN'],
'ORGANIZER' => ['CN'],
];

Go in here:

And end up as a "Str" parameter instead of array:
foreach ($searchParametersas$property => $parameter) {
$parameterAnd = $calendarObjectIdQuery->expr()->andX();
$parameterAnd->add($calendarObjectIdQuery->expr()->eq('cob.name', $calendarObjectIdQuery->createNamedParameter($property, IQueryBuilder::PARAM_STR)));
$parameterAnd->add($calendarObjectIdQuery->expr()->eq('cob.parameter', $calendarObjectIdQuery->createNamedParameter($parameter, IQueryBuilder::PARAM_STR)));
$searchOr->add($parameterAnd);
}

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen

Copy link
Copy Markdown
MemberAuthor

/backport to stable20

@faily-bot

faily-botBot commented Sep 24, 2020

Copy link
Copy Markdown

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 33352: failure

mariadb10.1-php7.3

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@MorrisJobke
MorrisJobke merged commit 5169976 into masterOct 5, 2020
@MorrisJobke
MorrisJobke deleted the bugfix/noid/array-to-string-conversion-on-event-search branch October 5, 2020 21:04
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@nickvergessen@rullzer@MorrisJobke