[go: nahoru, domu]

Skip to content

Commit

Permalink
Fixes bug phpmyadmin#13968
Browse files Browse the repository at this point in the history
Signed-off-by: Mattias Kågström <matkag@kth.se>
  • Loading branch information
mattiaskagstrom committed Apr 10, 2018
1 parent 9917c28 commit 80bca69
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libraries/classes/InsertEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -2078,11 +2078,13 @@ private function getSpecialCharsAndBackupFieldForInsertingMode(
$special_chars = Util::convertBitDefaultValue(
$column['Default']
);
} elseif (substr($trueType, 0, 9) == 'timestamp'
|| $trueType == 'datetime'
} elseif (substr($trueType, 0, 9) == 'timestamp'
|| ($trueType == 'datetime' && $column['Default'] == null)
|| $trueType == 'time'
) {
$special_chars = Util::addMicroseconds($column['Default']);
) {
$special_chars = Util::addMicroseconds($column['Default']);
} elseif($trueType == 'datetime' && $column['Default'] != null){
$special_chars = date("Y-m-d h:i:s");
} elseif ($trueType == 'binary' || $trueType == 'varbinary') {
$special_chars = bin2hex($column['Default']);
} else {
Expand Down

1 comment on commit 80bca69

@phpmyadmin-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit contains trailing whitespace, what is prohibited in phpMyAdmin. Please check our Developer guidelines for more information.

Offending files: libraries/classes/InsertEdit.php

Please sign in to comment.