Skip to content

Commit

Permalink
Fix PHP7.0 Fatal error: 'break' not in the 'loop' or 'switch' context…
Browse files Browse the repository at this point in the history
… in /home/michelem/htdocs/wp-content/plugins/wassupGIT/lib/wassup.class.php on line 2087
  • Loading branch information
michelem09 committed Jul 10, 2017
1 parent 0cfca23 commit e2ed82c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/wassup.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2084,12 +2084,12 @@ static function export_records($table,$start_id,$wherecondition,$dtype="sql"){
if(empty($result[0][1]) || is_wp_error($result)){
$err_msg=sprintf(__('Error with "SHOW CREATE TABLE" for %s.','wassup'), esc_attr($table));
wassup_log_message($err_msg);
break;
} else {
$table_create=$result[0][1];
$sql_header="#\n# " . sprintf(__('Table structure of table %s','wassup'),esc_attr($table))."\n#\n";
$sql_header .= preg_replace(array('/^CREATE\sTABLE\s(IF\sNOT\sEXISTS\s)?/i', '/AUTO_INCREMENT\=\d+\s/i'),array('CREATE TABLE IF NOT EXISTS ',''),$table_create).' ;';
$sql_header .= "\n#\n# ".sprintf(__('Data contents of table %s','wassup'),esc_attr($table))."\n#\n";
}
$table_create=$result[0][1];
$sql_header="#\n# " . sprintf(__('Table structure of table %s','wassup'),esc_attr($table))."\n#\n";
$sql_header .= preg_replace(array('/^CREATE\sTABLE\s(IF\sNOT\sEXISTS\s)?/i', '/AUTO_INCREMENT\=\d+\s/i'),array('CREATE TABLE IF NOT EXISTS ',''),$table_create).' ;';
$sql_header .= "\n#\n# ".sprintf(__('Data contents of table %s','wassup'),esc_attr($table))."\n#\n";
}
//set starting rec id of export query
if(empty($start_id) || !is_numeric($start_id)){
Expand Down

0 comments on commit e2ed82c

Please sign in to comment.