The function display_type() is defined separately in each of these reports in the reporting folder:
rep701.php
rep705.php
rep706.php
rep707.php
rep708.php
where the said $path_to_root is not used.
The $path_to_root variable is defined as global in gl/inquiry/balance_sheet.php as a standalone function.
The only place where the function needs to be changed is in gl/inquiry/profit_loss.php. It is defined in line 57 and is used in lines 108, 264 and 320.
In each case, the locally defined functions are not used outside the specific file.
@joe: kindly make the changes in gl/inquiry/profit_loss.php.
Those files in extensions who "include" this file should be aware of such a change and make amends if and when this is committed.
@joe: can commit changes to this file as needed.