sas             Wed Jan 10 11:07:23 2001 EDT

  Modified files:              
    /php4/ext/ircg      ircg.c 
  Log:
  Fix a bug of the D'oh! class (RETVAL instead of RETURN), let the first
  irconn_id be 1 and allow empty strings as format strings.
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.12 php4/ext/ircg/ircg.c:1.13
--- php4/ext/ircg/ircg.c:1.12   Wed Jan 10 07:52:01 2001
+++ php4/ext/ircg/ircg.c        Wed Jan 10 11:07:23 2001
@@ -31,7 +31,7 @@
 
 static HashTable h_fd2irconn;
 static HashTable h_irconn;
-static int irconn_id;
+static int irconn_id = 1;
 
 /* Format string numbers */
 enum {
@@ -536,7 +536,7 @@
                        conn, server, port, &conn->conn)) {
                free(conn->username);
                free(conn);
-               RETVAL_FALSE;
+               RETURN_FALSE;
        }
        if (p4) {
                HashTable *h;
@@ -545,8 +545,8 @@
 
                h = HASH_OF(*p4);
                for (i = 0; i < NO_FMTS; i++) {
-                       if (zend_hash_index_find(h, i, (void **) &arg) == SUCCESS
-                                       && Z_STRLEN_PP(arg)) {
+                       if (zend_hash_index_find(h, i, (void **) &arg) == SUCCESS) {
+                               convert_to_string_ex(arg);
                                conn->fmt_msgs[i] = strdup(Z_STRVAL_PP(arg));
                        } else
                                conn->fmt_msgs[i] = NULL;
@@ -598,6 +598,7 @@
 
        irc_msg(&conn->conn, Z_STRVAL_PP(recipient), Z_STRVAL_PP(msg));
        smart_str_setl(&l, Z_STRVAL_PP(msg), Z_STRLEN_PP(msg));
+       smart_str_0(&l);
        
        switch (Z_STRVAL_PP(recipient)[0]) {
        case '#':



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to