Menu

#4633 (ok 4.3.2) Wrong parameter in fetchValue

4.3.1
fixed
None
1
2014-12-12
2014-12-09
No

In libraries/insert_edit.lib.php around line 2380 there is probably a wrong parameter ($result) in the call to fetchValue. It is not a string.
It probably should be $sql_for_real_value instead.
Discovered by changing an inline varchar field to NULL in a view.

~~~~~~
$sql_for_real_value = 'SELECT ' . PMA_Util::backquote($table) . '.'
. PMA_Util::backquote($column_name)
. ' FROM ' . PMA_Util::backquote($db) . '.'
. PMA_Util::backquote($table)
. ' WHERE ' . $_REQUEST['where_clause'][0];
$result = $GLOBALS['dbi']->tryQuery($sql_for_real_value);
$fields_meta = $GLOBALS['dbi']->getFieldsMeta($result);
$meta = $fields_meta[0];
$new_value = $GLOBALS['dbi']->fetchValue($result);
if ($new_value !== false) {
~~~~~~~~~~

Discussion

  • Jørgen Thomsen

    Jørgen Thomsen - 2014-12-09

    oops it was a decimal(8,0) field

     
  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    • summary: Wrong parameter in fetchValue --> (ok 4.3.1) Wrong parameter in fetchValue
    • status: open --> resolved
    • Priority: 5 --> 1
     
  • Madhura Jayaratne

    • summary: (ok 4.3.1) Wrong parameter in fetchValue --> (ok 4.3.2) Wrong parameter in fetchValue
     
  • Marc Delisle

    Marc Delisle - 2014-12-12
    • Status: resolved --> fixed
     
MongoDB Logo MongoDB