georg           Fri Jul 23 08:48:21 2004 EDT

  Added files:                 (Branch: PHP_5_0)
    /php-src/ext/mysqli/tests   bug29311.phpt 

  Modified files:              
    /php-src/ext/mysqli mysqli_fe.c 
  Log:
  fixed bug #29311
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_fe.c?r1=1.40&r2=1.40.2.1&ty=u
Index: php-src/ext/mysqli/mysqli_fe.c
diff -u php-src/ext/mysqli/mysqli_fe.c:1.40 php-src/ext/mysqli/mysqli_fe.c:1.40.2.1
--- php-src/ext/mysqli/mysqli_fe.c:1.40 Wed Jul  7 04:02:27 2004
+++ php-src/ext/mysqli/mysqli_fe.c      Fri Jul 23 08:48:20 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_fe.c,v 1.40 2004/07/07 08:02:27 georg Exp $ 
+  $Id: mysqli_fe.c,v 1.40.2.1 2004/07/23 12:48:20 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -203,6 +203,7 @@
        PHP_FALIAS(master_query,mysqli_master_query,NULL)
        PHP_FALIAS(multi_query,mysqli_multi_query,NULL)
        PHP_FALIAS(more_results,mysqli_more_results, NULL)
+       PHP_FALIAS(mysqli, mysqli_connect, NULL)
        PHP_FALIAS(next_result, mysqli_next_result, NULL)
        PHP_FALIAS(options,mysqli_options,NULL)
        PHP_FALIAS(ping,mysqli_ping,NULL)

http://cvs.php.net/co.php/php-src/ext/mysqli/tests/bug29311.phpt?r=1.1&p=1
Index: php-src/ext/mysqli/tests/bug29311.phpt
+++ php-src/ext/mysqli/tests/bug29311.phpt
--TEST--
constructor test
--FILE--
<?php
        include "connect.inc";
        
        /* class 1 calls parent constructor */
        class mysql1 extends mysqli {
                function __construct() {
                        parent::__construct("localhost", "root", "", "test");
                }
        }

        /* class 2 has an own constructor */
        class mysql2 extends mysqli {
                
                function __construct() {
                        $this->connect("localhost", "root", "", "test");
                }
        }

        /* class 3 has no constructor */
        class mysql3 extends mysqli {
                
        }

        $foo[0] = new mysql1(); 
        $foo[1] = new mysql2(); 
        $foo[2] = new mysql3("localhost", "root", "", "test");


        for ($i=0; $i < 3; $i++) {
                if (($result = $foo[$i]->query("SELECT DATABASE()"))) {
                        $row = $result->fetch_row();
                        printf("%d: %s\n", $i, $row[0]);
                        $result->close();
                }
                $foo[$i]->close();
        }
?>
--EXPECTF--
0: test
1: test
2: test

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to