helly Thu Dec 5 15:01:31 2002 EDT
Modified files:
/php4/ext/mysql php_mysql.c
Log:
-fix a warning that was an error
-php_error -> php_error_docref
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.176 php4/ext/mysql/php_mysql.c:1.177
--- php4/ext/mysql/php_mysql.c:1.176 Sat Nov 16 11:07:54 2002
+++ php4/ext/mysql/php_mysql.c Thu Dec 5 15:01:31 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.176 2002/11/16 16:07:54 georg Exp $ */
+/* $Id: php_mysql.c,v 1.177 2002/12/05 20:01:31 helly Exp $ */
/* TODO:
*
@@ -663,7 +663,7 @@
/* ensure that the link did not die */
#if MYSQL_VERSION_ID > 32230 /* Use mysql_ping to ensure link is alive (and to
reconnect if needed) */
if (mysql_ping(le->ptr)) {
- php_error(E_WARNING, "%s: Link to server lost,
unable to reconnect", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+"Link to server lost, unable to reconnect");
zend_hash_del(&EG(persistent_list),
hashed_details, hashed_details_length+1);
efree(hashed_details);
MYSQL_DO_CONNECT_RETURN_FALSE();
@@ -682,7 +682,7 @@
#else
if (mysql_connect(le->ptr, host, user, passwd)==NULL) {
#endif
- php_error(E_WARNING, "%s: Link to server lost,
unable to reconnect", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+"Link to server lost, unable to reconnect");
zend_hash_del(&EG(persistent_list),
hashed_details, hashed_details_length+1);
efree(hashed_details);
MYSQL_DO_CONNECT_RETURN_FALSE();
@@ -988,7 +988,7 @@
PHP_FUNCTION(mysql_info)
{
zval **mysql_link;
- int id;
+ int id = -1;
char *str;
php_mysql_conn *mysql;
@@ -1192,8 +1192,7 @@
mysql_result = (MYSQL_RES *) zend_list_find(mysql->active_result_id,
&type);
if (mysql_result && type==le_result) {
if (!mysql_eof(mysql_result)) {
- php_error(E_NOTICE, "%s(): Function called without
first fetching all rows from a previous unbuffered query",
-
get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s():
+Function called without first fetching all rows from a previous unbuffered query");
while (mysql_fetch_row(mysql_result));
}
zend_list_delete(mysql->active_result_id);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php