From: Maurice J. <maj...@ya...> - 2006-12-11 18:15:02
|
Just installed phpwiki v1.3.12p configured to use MySQL+AdoDB. PHP 5.1.2 Mysql 4.1.21 When updating UserPreferences an "failed to insert" sql error is thrown because of duplicate keys. Traced problem to set|getPreferences functions in lib\Adodb.php. Specifically, the use of associative array to reference "prefs" field. I changed the code as follows in both setPreferences and getPreferences. I didn't see an clean way of calling $db->SetFetchMode(ADODB_FETCH_ASSOC) given the many different DBs supported. // MJ - 11/24/06 - using associative array reference here, but Adodb is not configured to that // changing to numeric array reference // change $prefs_blob = @$rs->fields['prefs']; to $prefs_blob = @$rs->fields[0]; Sorry, if this email posted twice. Hope this helps someone. Thanks, Maurice |