Issue Bug Closed

#105931ext:webhooks DH hook array access PHP warning

Christian Kuhn 01/14/25, 13:23 updated 12/02/25, 14:26

Description

When DataHandler fails to insert a page row in insertDB() for whatever reason, it does not “substitute” the DH “NEW123” page-id string with the DB uid since the insert failed. ext:webhooks TYPO3\CMS\Webhooks\Listener\PageModificationListener tries to access the id from DH->substNEWwithIDs[‘NEW123’] and does not sanitize this array access, leading to a PHP warning level error.

reproduce:
make insertDB() “fail” by having an early “return null;”, then try to create a new page

-> PHP Warning: Undefined array key “NEW6786641bb6e86718455196” in …/typo3/sysext/webhooks/Classes/Listener/PageModificationListener.php line 53

Reviews 3