api_get_page_type does not return value on second call
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3232479. --> Reported by: [anoopjohn](https://www.drupal.org/user/188049) >>> <p>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. </p>
issue