Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export hooks no longer work due to missing default keyword #2343

Closed
YongBoLiu opened this issue Jan 25, 2019 · 3 comments
Closed

Export hooks no longer work due to missing default keyword #2343

YongBoLiu opened this issue Jan 25, 2019 · 3 comments
Labels
bug Undesired behaviour resolved A fixed issue

Comments

@YongBoLiu
Copy link
Contributor

Some code after 'break;', the code will never be executed. Missing a 'default:' in lib/export.php , make the logic error.
Introduced in 22d9444

It should be as below,

				$xml_text .= "\n" . data_source_profile_to_xml($dep_id);
				break;
  •   		default:
      			$param = array(); 					$xml_text .= "\n" . data_source_profile_to_xml($dep_id);
      			break;
    
  •   		default:
      			$param = array();
      			$param['dep_id']   = $dep_id;
      			$param['dep_type'] = $dep_type;
    
      			$param['dep_id']   = $dep_id;
      			$param['dep_type'] = $dep_type;
    
@YongBoLiu
Copy link
Contributor Author

`+++ lib/export.php 2019-01-25 14:49:14.635851970 +0800
@@ -1117,6 +1117,7 @@
$xml_text .= "\n" . data_source_profile_to_xml($dep_id);
break;

  •   		default:
      			$param = array();
      			$param['dep_id']   = $dep_id;
      			$param['dep_type'] = $dep_type;
    

`
in function get_item_xml()

@netniV netniV changed the title Missing a 'default:' in lib/export.php cause export hookable not work Export hooks no longer work due to missing default keyword Jan 25, 2019
netniV added a commit that referenced this issue Jan 25, 2019
Export hooks no longer work due to missing default keyword in function get_item_xml().  As there was a small section of code after a 'break' keyword in a switch condition, this suggests the default keyword was accidentally removed.
@netniV
Copy link
Member

netniV commented Jan 25, 2019

This is now in the main development code, please check and close if issue is resolved.

@netniV netniV added bug Undesired behaviour resolved A fixed issue labels Jan 25, 2019
netniV added a commit that referenced this issue Jan 25, 2019
Export hooks no longer work due to missing default keyword in function get_item_xml().  As there was a small section of code after a 'break' keyword in a switch condition, this suggests the default keyword was accidentally removed.
@YongBoLiu
Copy link
Contributor Author

It's works in my Env. Thanks.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants