Problem/Motivation

The attached patch is probably self-explanatory.

block_admin_configure() uses the value -1 to test whether a block is in a region or not.
Maybe we should use the constant BLOCK_REGION_NONE instead of -1, in case one day we want to change the value of BLOCK_REGION_NONE.

Proposed resolution

Use BLOCK_REGION_NONE instead of -1. See patch.

Remaining tasks

Review/test/advise about the patch.

CommentFileSizeAuthor
block_region_none_instead_of_-1.patch716 bytesfengtan

Comments

fengtan created an issue. See original summary.

sharique’s picture

This sounds good idea and patch looks good.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.