Author: uwendel
Date: 2007-06-28 10:36:36 +0200 (Thu, 28 Jun 2007)
New Revision: 552
Modified:
trunk/php6/ext/mysql/php_mysql.c
Log:
Fixing some five test crashes. However, this introduces a tiny BC break in list_tables().
See the correspondending test - at one place we return false instead of NULL (or
the other way around, don't recall). The tests will give you the details.
Modified: trunk/php6/ext/mysql/php_mysql.c
===================================================================
--- trunk/php6/ext/mysql/php_mysql.c 2007-06-28 08:30:10 UTC (rev 551)
+++ trunk/php6/ext/mysql/php_mysql.c 2007-06-28 08:36:36 UTC (rev 552)
@@ -640,7 +640,7 @@
/* We cannot use mysql_port anymore in windows, need to use
* mysql_real_connect() to set the port.
*/
- if (host_len && (tmp=strchr(host_and_port, ':'))) {
+ if (host_and_port && (tmp=strchr(host_and_port, ':'))) {
host = estrndup(host_and_port, tmp-host_and_port);
free_host = 1;
tmp++;
@@ -1467,7 +1467,7 @@
return;
}
- if (ZEND_NUM_ARGS() == 1) {
+ if (ZEND_NUM_ARGS() < 2) {
id = php_mysql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU);
CHECK_LINK(id);
}
@@ -1504,7 +1504,7 @@
return;
}
- if (ZEND_NUM_ARGS() == 1) {
+ if (ZEND_NUM_ARGS() < 3) {
id = php_mysql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU);
CHECK_LINK(id);
}
| Thread |
|---|
| • PHP mysqlnd svn commit: r552 - trunk/php6/ext/mysql | uwendel | 28 Jun |