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

History 25

  1. Christian Kuhn commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-01-14T15:40:10+00:00" > 01/14/25, 15:40 </span>

    Applied in changeset commit:1bd1923ef7fb3290e9e8303a2a30bc34c1dc83f6.