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 function api_get_page_type uses a static variable and a static flag to prevent execution of the logic the second time but the return statement is inside the condition where the static flag is checked. So subsequent calls to the function does not return any value. Only the first call returns the page type correctly.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3232479-api-fix_api_get_page_type-return.patch | 230 bytes | anoopjohn |
Comments
Comment #2
anoopjohn CreditAttribution: anoopjohn commentedThe following patch moves the return to outside of the if condition.
Comment #3
drummSetting status so testing runs.
Comment #5
drummLooks good, committed.