ID:               33480
 Comment by:       a_developer_in at yahoo dot co dot in
 Reported By:      info at heyne dot biz
 Status:           No Feedback
 Bug Type:         dBase related
 Operating System: Suse 9.0
 PHP Version:      5.0.4
 New Comment:

No it did not solve that error..no binary helped me..please help me out


Previous Comments:
------------------------------------------------------------------------

[2005-07-04 01:00:05] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2005-06-26 19:17:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-06-26 15:13:05] info at heyne dot biz

Description:
------------
dbase_add_record() failed with 'unexpected error'



Problem located in dbase.c: 

PHP_FUNCTION(dbase_add_record) { .....

for (i = 0, cur_f = dbf; cur_f < &dbf[num_fields]; i++, cur_f++) {
zval tmp;
if (zend_hash_index_find(Z_ARRVAL_PP(fields), i, (void **)&field) ==
FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unexpected error");
efree(cp);
RETURN_FALSE;
}

Reproduce code:
---------------
$db = dbase_open( 'test.dbf', 2 );
$record = dbase_get_record_with_names ( $db, 1);
unset($record['deleted']);
dbase_add_record( $db, $record );
dbase_close($db);



--> test.dbf contains only String fields ! <--

Expected result:
----------------
Record should be inserted

Actual result:
--------------
Warning: dbase_add_record() [function.dbase-add-record]: unexpected
error in .../export_db.php on line 4


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33480&edit=1

Reply via email to