#2862 Not able to accept changes

v4.2.4
closed-fixed
Gerry Kroll
None
5
2011-03-08
2011-03-08
Blaza
No

I have PhpGedView 4.2.4 with PDO/Postgresql 8.2.5 with multiple gedcoms. When trying to accept changes I get an error:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "surname.ged"' in /includes/classes/class_pgv_db.php:835 Stack trace: #0 [internal function]: PDOStatement->execute(Array) #1 /includes/classes/class_pgv_db.php(835): call_user_func_array(Array, Array) #2 /includes/functions/functions_db.php(2813): PGV_DBStatement->__call('execute', Array) #3 /includes/functions/functions_db.php(2813): PGV_DBStatement->execute(Array) #4 /includes/functions/functions_import.php(1383): get_user_from_gedcom_xref('surname.ged', 'I3') #5 /edit_changes.php(70): accept_changes('I3_surname.ged') #6 {main} thrown in /includes/classes/class_pgv_db.php on line 835

It seems like the problem is in function_import.php in line 1383:
$username = get_user_from_gedcom_xref($GEDCOM, $gid);
$GEDCOM is not numeric

I have changed the line to:
$username = get_user_from_gedcom_xref($ged_id, $gid);
and this works correctly.

Discussion

  • Gerry Kroll
    Gerry Kroll
    2011-03-08

    • assigned_to: nobody --> canajun2eh
     
  • Gerry Kroll
    Gerry Kroll
    2011-03-08

    Thank you. You are correct.

    I wonder why no-one else has reported this problem?

     
  • Gerry Kroll
    Gerry Kroll
    2011-03-08

    "includes/functions/functions_import.php" for 4.2.4

     
    Attachments
  • Gerry Kroll
    Gerry Kroll
    2011-03-08

    • status: open --> closed-fixed
     
  • Gerry Kroll
    Gerry Kroll
    2011-03-08

    Fixed in SVN 7033.

    Download the attached ZIP file and after decompressing it, copy the result to the server directory where PhpGedView is installed.

    This replaces file "includes/functions/functions_import.php".