Menu

#4551 (ok 4.3) Wrong test in source code

4.1.7
fixed
None
1
2014-12-17
2014-10-05
No

Since this commit: 4616eb0 , the function PMA_getSpecialCharsAndBackupFieldForExistingRow (in libraries/insert_edit.lib.php) contains this code:

} elseif ((substr($column['True_Type'], 0, 9) == 'timestamp'
    || $column['True_Type'] == 'datetime'
    || $column['True_Type'] == 'time')
    && (strpos ($current_row[$column['Field']],"." ) === TRUE)
) {

As you can see, the last condition is: strpos([…]) === true.
This shouldn't be possible… strpos will return a number or false.

I think that this condition will never be true.

Discussion

  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    • summary: Wrong test in source code --> (ok 4.3) Wrong test in source code
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Marc Delisle

    Marc Delisle - 2014-12-05
    • Status: resolved --> fixed