Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The first comment on https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func... points out that the parameter should be passed by reference, which seems to be correct. But even if that's not correct, there's also no return in the example, so I think the documentation is misleading either way.
I believe the documentation needs "$commands" changed to "&$commands". I'll leave this rare one-character core patch opportunity for someone else to enjoy.
Comment | File | Size | Author |
---|---|---|---|
#2 | hook_ajax_render_alter_is_missing_and_in_function_signature-2215877-1.patch | 514 bytes | asrob |
Comments
Comment #1
jhodgdonGood catch! Yes, it should be passed by reference, as in all other _alter() hooks.
This is a 7.x problem only by the way; the 8.x docs have the &.
This one-character patch opportunity is great for a Novice contributor...
Comment #2
asrobI attached a patch, thanks for the opportunity!
Comment #3
jhodgdonThanks, that is what we needed! I'll get it committed soon.
Comment #4
jhodgdonThanks again! Committed to 7.x.