convert_real_interface_to_friendly_interface_name() goes and checks the parent and this gives wrong information 99.9 percent of the time on scenarios like when this is called for unassigned vlans etc, while its real purpose is just to check if the interface is assigned and return the intermeddiate/config name of the interface. Leave the get_parent_option there in the function but it needs to be asked specifically for.
Go through the same checks when called from command line and when called from fcgi.