API page: http://api.drupal.org/api/drupal/modules--block--block.module/function/b...

Describe the problem you have found:

$block is not a parameter:

$block object for $module.

#4 blockParamFormatting-1275214.patch495 bytescashwilliams
PASSED: [[SimpleTest]]: [MySQL] 32,950 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


dawehner’s picture

Oh this one is nice. Here is the original block in php

 * @param $module
 *   Name of the module that implements the block to load.
 * @param $delta
 *   Unique ID of the block within the context of $module. Pass NULL to return
 *   an empty $block object for $module.

So the amount of signs is exactly that it looks like it would be another parameter.
This seems to be that there should be a kind of styling for the next param.

jhodgdon’s picture

Title: Documentation problem with block_load » block_load should not refer to $block
Version: 7.x-dev » 8.x-dev
Issue tags: +Novice, +needs backport to D7

I think you're just objecting to this:

* @param $delta
 *   Unique ID of the block within the context of $module. Pass NULL to return
 *   an empty $block object for $module.

when $block is not actually a variable.

OK. That's a valid point. $block here should just be "block", as in "return an empty block object...". Sounds like a good project for a novice contributor to learn how to make a patch!

lukus’s picture

I'd be happy to learn how to make a patch - please point me in the right direction ..

cashwilliams’s picture

Status: Active » Needs review
495 bytes
PASSED: [[SimpleTest]]: [MySQL] 32,950 pass(es). View

lukus - I just followed the steps on this page - http://drupal.org/project/drupal/git-instructions

Not sure about how to properly name this patch.

jhodgdon’s picture

Status: Needs review » Active
jhodgdon’s picture

Status: Active » Reviewed & tested by the community

Sorry, cross-post! Looks like you found some instructions. :)

The patch looks fine (assuming the test bot agrees), and should apply to d7 and d8. Thanks!

jhodgdon’s picture

Oh, and regarding patch naming - the name you chose is fine. Usually people put the issue number and a description in the name, which you did.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x.

lukus’s picture

Thx for the info - I'll be good to go next time.

Automatically closed -- issue fixed for 2 weeks with no activity.