summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_nonapi.c
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2003-12-13 16:08:13 +0000
committerGeorg Richter <georg@php.net>2003-12-13 16:08:13 +0000
commitec5b38fae9b03c1465e4dd91351d6ea69850f9e3 (patch)
tree6c1813e1dcd4e3ea6eaa994526069494249e4be7 /ext/mysqli/mysqli_nonapi.c
parent47a32a57e80e721b93189f86f0ed57d8e1efa8b1 (diff)
downloadphp-git-ec5b38fae9b03c1465e4dd91351d6ea69850f9e3.tar.gz
minor fixes for embedded
Diffstat (limited to 'ext/mysqli/mysqli_nonapi.c')
-rw-r--r--ext/mysqli/mysqli_nonapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 34bf332953..2a50d773c8 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -116,8 +116,12 @@ PHP_FUNCTION(mysqli_embedded_connect)
mysql = mysql_init(NULL);
if (mysql_real_connect(mysql, NULL, NULL, NULL, dbname, 0, NULL, 0) == NULL) {
+ MYSQLI_REPORT_MYSQL_ERROR(mysql);
php_mysqli_set_error(mysql_errno(mysql), (char *) mysql_error(mysql) TSRMLS_CC);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", mysql_error(mysql));
+
+ if (!(MyG(report_mode) & MYSQLI_REPORT_ERROR)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", mysql_error(mysql));
+ }
/* free mysql structure */
mysql_close(mysql);
RETURN_FALSE;