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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anoopjohn created an issue. See original summary.

anoopjohn’s picture

The following patch moves the return to outside of the if condition.

drumm’s picture

Status: Active » Needs review

Setting status so testing runs.

  • drumm committed 1c7947d on 7.x-2.x authored by anoopjohn
    Issue #3232479 by anoopjohn: api_get_page_type does not return value on...
drumm’s picture

Status: Needs review » Fixed

Looks good, committed.

Status: Fixed » Closed (fixed)

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