#105931ext:webhooks DH hook array access PHP warning
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
-
Gerrit Code Review pushed patch set 1 for main to change 87758 status
NewUnder Review <span data-processor="relativetime" data-value="2025-01-14T13:36:46+00:00" > 01/14/25, 13:36 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 87759 <span data-processor="relativetime" data-value="2025-01-14T15:12:02+00:00" > 01/14/25, 15:12 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 87760 <span data-processor="relativetime" data-value="2025-01-14T15:12:06+00:00" > 01/14/25, 15:12 </span>
-
Christian Kuhn commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-01-14T15:40:10+00:00" > 01/14/25, 15:40 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:26:43+00:00" > 12/02/25, 14:26 </span>
Applied in changeset commit:1bd1923ef7fb3290e9e8303a2a30bc34c1dc83f6.