summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_warning.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2008-03-18 16:57:31 +0000
committerAndrey Hristov <andrey@php.net>2008-03-18 16:57:31 +0000
commitcaf3e9c3f1c329b496b00501b8baef4dbfc66b4f (patch)
tree256aa613a7db94da81fb7ecbda0efaf040e23d3d /ext/mysqli/mysqli_warning.c
parentbd9e02695154548e66ebec844c21f900f88ae7c0 (diff)
downloadphp-git-caf3e9c3f1c329b496b00501b8baef4dbfc66b4f.tar.gz
Fixed a bunch of bugs reported in
Bug #44352 mysqli_connect_error() false negative for host errors From now on the mysqli object doesn't have that magic properties, like error, which were readable but not visible through isset(), property_exists() and var_dump(). All other ext/mysqli classes were fixed too. Now it will be easier to debug mysqli based applications.
Diffstat (limited to 'ext/mysqli/mysqli_warning.c')
-rw-r--r--ext/mysqli/mysqli_warning.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c
index 8461217034..125ef17c60 100644
--- a/ext/mysqli/mysqli_warning.c
+++ b/ext/mysqli/mysqli_warning.c
@@ -321,13 +321,23 @@ const zend_function_entry mysqli_warning_methods[] = {
/* {{{ mysqli_warning_property_entries */
const mysqli_property_entry mysqli_warning_property_entries[] = {
- {"message", mysqli_warning_message, NULL},
- {"sqlstate", mysqli_warning_sqlstate, NULL},
- {"errno", mysqli_warning_errno, NULL},
- {NULL, NULL, NULL}
+ {"message", sizeof("message") - 1, mysqli_warning_message, NULL},
+ {"sqlstate", sizeof("sqlstate") - 1, mysqli_warning_sqlstate, NULL},
+ {"errno", sizeof("errno") - 1, mysqli_warning_errno, NULL},
+ {NULL, 0, NULL, NULL}
};
/* }}} */
+/* {{{ mysqli_warning_property_info_entries */
+zend_property_info mysqli_warning_property_info_entries[] = {
+ {ZEND_ACC_PUBLIC, "message", sizeof("message") - 1, 0, NULL, 0, NULL},
+ {ZEND_ACC_PUBLIC, "sqlstate", sizeof("sqlstate") - 1, 0, NULL, 0, NULL},
+ {ZEND_ACC_PUBLIC, "errno", sizeof("errno") - 1, 0, NULL, 0, NULL},
+ {0, NULL, 0, 0, NULL, 0, NULL}
+};
+/* }}} */
+
+
/*
* Local variables:
* tab-width: 4