Skip to content

ElasticContentSaveHook.php: Typecast nessecary #2

@tastendruecker

Description

@tastendruecker

file Classes /Hook/ElasticContentSaveHook.php
function processDatamap_afterDatabaseOperations

param $id is declared as string but under some circumstances the function gets called with $id as an int. Thus in line 78:
if (strpos($id, 'NEW') !== false) {
$id should be cast to string to avoid exceptions.

Then again in line 81
$currentRecord = $this->typo3Services->backendUtilityGetRecord($table, $id);
$id should be cast to int as the called method expects $id to be int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions