php_pqconn_object_handlers.get_properties = php_pq_object_properties;
php_pqconn_object_handlers.get_debug_info = php_pq_object_debug_info;
- zend_hash_init(&php_pqconn_object_prophandlers, 14, NULL, NULL, 1);
+ zend_hash_init(&php_pqconn_object_prophandlers, 19, NULL, NULL, 1);
zend_declare_property_long(php_pqconn_class_entry, ZEND_STRL("status"), CONNECTION_BAD, ZEND_ACC_PUBLIC TSRMLS_CC);
ph.read = php_pqconn_object_read_status;
php_pqres_object_handlers.get_properties = php_pq_object_properties;
php_pqres_object_handlers.count_elements = php_pqres_count_elements;
- zend_hash_init(&php_pqres_object_prophandlers, 6, NULL, NULL, 1);
+ zend_hash_init(&php_pqres_object_prophandlers, 8, NULL, NULL, 1);
zend_declare_property_null(php_pqres_class_entry, ZEND_STRL("status"), ZEND_ACC_PUBLIC TSRMLS_CC);
ph.read = php_pqres_object_read_status;
static PHP_METHOD(pqstm, bind) {
long param_no;
zval *param_ref;
+ zend_error_handling zeh;
+ STATUS rv;
+
+ zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC);
+ rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", ¶m_no, ¶m_ref);
+ zend_restore_error_handling(&zeh TSRMLS_CC);
- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", ¶m_no, ¶m_ref)) {
+ if (SUCCESS == rv) {
php_pqstm_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC);
if (!obj->intern) {
if (!obj->intern) {
throw_exce(EX_UNINITIALIZED TSRMLS_CC, "pq\\Transacation not initialized");
} else if (!obj->intern->open) {
- throw_exce(EX_RUNTIME TSRMLS_CC, "pq\\Transacation already closed");
+ throw_exce(EX_RUNTIME TSRMLS_CC, "pq\\Transaction already closed");
} else {
PGresult *res;
smart_str cmd = {0};
obj->intern = ecalloc(1, sizeof(*obj->intern));
obj->intern->conn = conn_obj;
php_pq_object_addref(conn_obj TSRMLS_CC);
- zend_hash_init(&obj->intern->types, 300, NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_init(&obj->intern->types, 512, NULL, ZVAL_PTR_DTOR, 0);
if (znsp) {
zend_call_method_with_1_params(&getThis(), Z_OBJCE_P(getThis()), NULL, "refresh", &retval, znsp);
php_pqtypes_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
php_pqtypes_class_entry->create_object = php_pqtypes_create_object;
+ /*
+ zend_class_implements(php_pqtypes_class_entry TSRMLS_CC, 1, zend_ce_arrayaccess);
+ */
+
memcpy(&php_pqtypes_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
php_pqtypes_object_handlers.read_property = php_pq_object_read_prop;
php_pqtypes_object_handlers.write_property = php_pq_object_write_prop;