}
}
+ if (stmt) {
+ /* always propogate the error code back up to the dbh,
+ * so that we can catch the error information when execute
+ * is called via query. See Bug #33707 */
+ if (H->einfo.errmsg) {
+ efree(H->einfo.errmsg);
+ }
+ H->einfo = *einfo;
+ H->einfo.errmsg = einfo->errmsg ? estrdup(einfo->errmsg) : NULL;
+ strcpy(dbh->error_code, stmt->error_code);
+ }
+
/* little mini hack so that we can use this code from the dbh ctor */
if (!dbh->methods) {
zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 TSRMLS_CC, "SQLSTATE[%s]: %s", *pdo_err, einfo->errmsg);
Z_TYPE_P(param->parameter) == IS_NULL) {
S->param_values[param->paramno] = NULL;
S->param_lengths[param->paramno] = 0;
+ } else if (Z_TYPE_P(param->parameter) == IS_BOOL) {
+ S->param_values[param->paramno] = Z_BVAL_P(param->parameter) ? "t" : "f";
+ S->param_lengths[param->paramno] = 1;
+ S->param_formats[param->paramno] = 1;
} else {
convert_to_string(param->parameter);
S->param_values[param->paramno] = Z_STRVAL_P(param->parameter);
char *func_name;
int func_name_len;
long argc = -1;
+#ifdef IS_UNICODE
zval cbname;
+#else
+ char *cbname;
+#endif
pdo_dbh_t *dbh;
pdo_sqlite_db_handle *H;
int ret;
dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
if (!zend_is_callable(callback, 0, &cbname)) {
+#ifdef IS_UNICODE
php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%R' is not callable", Z_TYPE(cbname), Z_UNIVAL(cbname));
zval_dtor(&cbname);
+#else
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname);
+ efree(cbname);
+#endif
RETURN_FALSE;
}
+#ifdef IS_UNICODE
zval_dtor(&cbname);
+#else
+ efree(cbname);
+#endif
H = (pdo_sqlite_db_handle *)dbh->driver_data;
char *func_name;
int func_name_len;
long argc = -1;
+#ifdef IS_UNICODE
zval cbname;
+#else
+ char *cbname;
+#endif
pdo_dbh_t *dbh;
pdo_sqlite_db_handle *H;
int ret;
dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
if (!zend_is_callable(step_callback, 0, &cbname)) {
+#ifdef IS_UNICODE
php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%R' is not callable", Z_TYPE(cbname), Z_UNIVAL(cbname));
zval_dtor(&cbname);
+#else
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname);
+ efree(cbname);
+#endif
RETURN_FALSE;
}
+#ifdef IS_UNICODE
zval_dtor(&cbname);
+#else
+ efree(cbname);
+#endif
if (!zend_is_callable(fini_callback, 0, &cbname)) {
+#ifdef IS_UNICODE
php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%R' is not callable", Z_TYPE(cbname), Z_UNIVAL(cbname));
zval_dtor(&cbname);
+#else
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname);
+ efree(cbname);
+#endif
RETURN_FALSE;
}
+#ifdef IS_UNICODE
zval_dtor(&cbname);
+#else
+ efree(cbname);
+#endif
H = (pdo_sqlite_db_handle *)dbh->driver_data;