Commit fdd4e302 authored by Mona Muzaffar's avatar Mona Muzaffar Committed by Christian Kuhn
Browse files

[BUGFIX] Access check for delete pages expects array of integers

An error occurs in the createNamedParameter function
which expects an array but gets a string instead.

Change-Id: I393a6a87c912129ded28f677ca65c081fc4205e7
Resolves: #79309
Releases: master
Reviewed-on: https://review.typo3.org/51342

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 4405c888
......@@ -8074,7 +8074,12 @@ class DataHandler
*/
public function noRecordsFromUnallowedTables($inList)
{
$inList = trim($this->rmComma(trim($inList)));
if (strpos($inList, ',') !== false) {
$pids = GeneralUtility::intExplode(',', $inList, true);
} else {
$inList = trim($this->rmComma(trim($inList)));
$pids = [$inList];
}
if ($inList && !$this->admin) {
foreach ($GLOBALS['TCA'] as $table => $_) {
$query = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
......@@ -8085,7 +8090,7 @@ class DataHandler
->from($table)
->where($query->expr()->in(
'pid',
$query->createNamedParameter($inList, Connection::PARAM_INT_ARRAY)
$query->createNamedParameter($pids, Connection::PARAM_INT_ARRAY)
))
->execute()
->fetchColumn(0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment