[BUGFIX] Ensure no PHP warning is thrown if legacy code is used