1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00

@ Fixed dbase_add_record. (Sterling)

Fixed dbase_add_record
This commit is contained in:
Sterling Hughes
2000-07-23 03:45:24 +00:00
parent e67fa9823d
commit 8aadb68db1
+7 -2
View File
@@ -274,13 +274,18 @@ PHP_FUNCTION(dbase_add_record) {
dbf = dbh->db_fields;
for (i = 0, cur_f = dbf; cur_f < &dbf[num_fields]; i++, cur_f++) {
zval tmp;
if (zend_hash_index_find(fields->value.ht, i, (void **)&field) == FAILURE) {
php_error(E_WARNING, "unexpected error");
efree(cp);
RETURN_FALSE;
}
convert_to_string(field);
sprintf(t_cp, cur_f->db_format, field->value.str.val);
tmp = *field;
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
sprintf(t_cp, cur_f->db_format, tmp.value.str.val);
zval_dtor(&tmp);
t_cp += cur_f->db_flen;
}