fix: #3470143 Stop captcha_point_load() running as hook_ENTITY_TYPE_load() for "point" entities

Closes #3470143 (also reported as #3458987 and #3524332)

captcha_point_load() has a name that matches hook_ENTITY_TYPE_load() for any entity type with the ID point, so core invokes it with an array of loaded entities and it forwards that array to CaptchaPoint::load(). That causes the array_flip() warning reported here on older cores and a TypeError on Drupal 11.

  • captcha_point_load() now ignores array arguments (the hook call) and is deprecated for removal in 3.0.0. It is kept rather than renamed, so code calling it does not break (the rename in !94 (closed) would have).
  • The CAPTCHA point form's machine name exists callback uses CaptchaPoint::load() directly, so the module itself no longer calls the deprecated function.

CaptchaPointLoadHookCollisionTest (kernel) adds a test module with a point config entity type and loads one. It errors without the fix. Full suite green on Drupal 10.6.6 and 11.

Merge request reports

Loading
Loading