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.
This function forces the module element in $form_state to be 'page_manager_task_handler', even though it is a part of ctools.module and not page_manager.module
It's probably fine to keep its current value as a sensible default, but I'd like it to check to see if a value has already been set before overwriting it.
Current:
<?php
function ctools_context_handler_edit_criteria($form, &$form_state) {
...
$form_state['module'] = 'page_manager_task_handler';
...
}
?>
Proposed:
<?php
function ctools_context_handler_edit_criteria($form, &$form_state) {
...
$form_state['module'] = (!isset($form_state['module'])) ? $form_state['module'] : 'page_manager_task_handler';
...
}
?>
Patch coming
Comment | File | Size | Author |
---|---|---|---|
#2 | 1587954.patch | 798 bytes | nicksanta |
#1 | 1587954.patch | 799 bytes | nicksanta |
Comments
Comment #1
nicksanta CreditAttribution: nicksanta commentedComment #2
nicksanta CreditAttribution: nicksanta commentedUrgh.. I replaced empty() with isset() and forgot to remove the !
Rerolled.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted and pushed!