uw Wed Oct 10 10:49:00 2007 UTC Modified files: /php-src/ext/mysqli/tests bug29311.phpt bug33263.phpt mysqli_affected_rows_oo.phpt mysqli_autocommit_oo.phpt mysqli_autocommit.phpt mysqli_class_mysqli_interface.phpt mysqli_class_mysqli_reflection.phpt mysqli_connect.phpt mysqli_fetch_all_oo.phpt mysqli_fetch_all.phpt mysqli_fetch_assoc.phpt mysqli_fetch_object.phpt Log: Commiting changes into HEAD = synching with 5_3
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug29311.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mysqli/tests/bug29311.phpt diff -u php-src/ext/mysqli/tests/bug29311.phpt:1.4 php-src/ext/mysqli/tests/bug29311.phpt:1.5 --- php-src/ext/mysqli/tests/bug29311.phpt:1.4 Thu Aug 9 09:43:28 2007 +++ php-src/ext/mysqli/tests/bug29311.phpt Wed Oct 10 10:49:00 2007 @@ -1,14 +1,14 @@ --TEST-- constructor test --SKIPIF-- -<?php -require_once('skipif.inc'); +<?php +require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- <?php include "connect.inc"; - + /* class 1 calls parent constructor */ class mysql1 extends mysqli { function __construct() { @@ -19,7 +19,7 @@ /* class 2 has an own constructor */ class mysql2 extends mysqli { - + function __construct() { global $host, $user, $passwd, $db, $port, $socket; $this->connect($host, $user, $passwd, $db, $port, $socket); @@ -28,24 +28,24 @@ /* class 3 has no constructor */ class mysql3 extends mysqli { - + } - $foo[0] = new mysql1(); - $foo[1] = new mysql2(); + $foo[0] = new mysql1(); + $foo[1] = new mysql2(); $foo[2] = new mysql3($host, $user, $passwd, $db, $port, $socket); for ($i=0; $i < 3; $i++) { if (($result = $foo[$i]->query("SELECT DATABASE()"))) { $row = $result->fetch_row(); - printf("%d: %s\n", $i, $row[0]); + if ($row[0] != $db) + printf("%d: %s\n", $i, $row[0]); $result->close(); } $foo[$i]->close(); } + print "done!"; ?> --EXPECTF-- -0: test -1: test -2: test +done! \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug33263.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/mysqli/tests/bug33263.phpt diff -u php-src/ext/mysqli/tests/bug33263.phpt:1.5 php-src/ext/mysqli/tests/bug33263.phpt:1.6 --- php-src/ext/mysqli/tests/bug33263.phpt:1.5 Thu Aug 9 09:43:28 2007 +++ php-src/ext/mysqli/tests/bug33263.phpt Wed Oct 10 10:49:00 2007 @@ -1,8 +1,8 @@ --TEST-- -Bug #33263 (mysqli_real_connect in __construct) +Bug #33263 (mysqli_real_connect in __construct) --SKIPIF-- -<?php -require_once('skipif.inc'); +<?php +require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> @@ -23,13 +23,16 @@ $stmt = $mysql->prepare("SELECT DATABASE()"); $stmt->execute(); - $stmt->bind_result($db); + $stmt->bind_result($database); $stmt->fetch(); $stmt->close(); - var_dump($db); + if ($database != $db) + printf("[001] Expecting '%s' got %s/'%s'.\n", + gettype($database), $database); $mysql->close(); + print "done!"; ?> --EXPECTF-- -%s(4) "test" +done! \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_affected_rows_oo.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_affected_rows_oo.phpt diff -u php-src/ext/mysqli/tests/mysqli_affected_rows_oo.phpt:1.2 php-src/ext/mysqli/tests/mysqli_affected_rows_oo.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_affected_rows_oo.phpt:1.2 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_affected_rows_oo.phpt Wed Oct 10 10:49:00 2007 @@ -1,7 +1,7 @@ --TEST-- mysqli->affected_rows --SKIPIF-- -<?php +<?php require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); @@ -10,13 +10,17 @@ <?php include "connect.inc"; + $mysqli = new mysqli(); + if (NULL !== ($tmp = @$mysqli->affected_rows)) + printf("[000a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) { printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); } if (0 !== ($tmp = $mysqli->affected_rows)) - printf("[002] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp); + printf("[002] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp); if (!$mysqli->query('DROP TABLE IF EXISTS test')) printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error); http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_autocommit_oo.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_autocommit_oo.phpt diff -u php-src/ext/mysqli/tests/mysqli_autocommit_oo.phpt:1.3 php-src/ext/mysqli/tests/mysqli_autocommit_oo.phpt:1.4 --- php-src/ext/mysqli/tests/mysqli_autocommit_oo.phpt:1.3 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_autocommit_oo.phpt Wed Oct 10 10:49:00 2007 @@ -2,9 +2,10 @@ mysqli->autocommit() --SKIPIF-- <?php - require_once('skipif.inc'); + require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); + require_once('connect.inc'); if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) { printf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_autocommit.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_autocommit.phpt diff -u php-src/ext/mysqli/tests/mysqli_autocommit.phpt:1.3 php-src/ext/mysqli/tests/mysqli_autocommit.phpt:1.4 --- php-src/ext/mysqli/tests/mysqli_autocommit.phpt:1.3 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_autocommit.phpt Wed Oct 10 10:49:00 2007 @@ -2,28 +2,26 @@ mysqli_autocommit() --SKIPIF-- <?php - require_once('skipif.inc'); + require_once('connect.inc'); + require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { - printf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); - exit(1); + die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", + $host, $user, $db, $port, $socket)); } - if (!$res = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) { - printf("skip Cannot fetch have_innodb variable\n"); - exit(1); + if (!$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) { + die("skip Cannot check for required InnoDB suppot"); } + if (!$row = mysqli_fetch_row($result)) + die("skip Cannot check for required InnoDB suppot"); - $row = mysqli_fetch_row($res); - mysqli_free_result($res); + mysqli_free_result($result); mysqli_close($link); - if ($row[1] == "DISABLED" || $row[1] == "NO") { - printf ("skip Innodb support is not installed or enabled."); - exit(1); + die(sprintf ("skip innodb support is not installed or enabled.")); } ?> --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt:1.2 php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt:1.2 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt Wed Oct 10 10:49:00 2007 @@ -48,8 +48,6 @@ 'rollback' => true, 'select_db' => true, 'set_charset' => true, - 'set_local_infile_default' => true, - 'set_local_infile_handler' => true, 'set_opt' => true, 'stat' => true, 'stmt_init' => true, @@ -93,6 +91,8 @@ if (function_exists('mysqli_ssl_set')) $expected_methods['ssl_set'] = true; + $expected_methods['set_local_infile_default'] = true; + $expected_methods['set_local_infile_handler'] = true; } /* we should add ruled when to expect them */ @@ -305,4 +305,4 @@ Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation): mysqli->connect_error = ''/unicode (''/unicode) mysqli->connect_errno = '0'/integer ('0'/integer) -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt diff -u php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt:1.1 php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt:1.2 --- php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt:1.1 Mon Jul 23 12:11:38 2007 +++ php-src/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt Wed Oct 10 10:49:00 2007 @@ -551,38 +551,6 @@ Number of Parameters: 0 Number of Required Parameters: 0 -Inspecting method 'set_local_infile_default' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 - -Inspecting method 'set_local_infile_handler' -isFinal: no -isAbstract: no -isPublic: yes -isPrivate: no -isProtected: no -isStatic: no -isConstructor: no -isDestructor: no -isInternal: yes -isUserDefined: no -returnsReference: no -Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 - Inspecting method 'set_opt' isFinal: no isAbstract: no @@ -678,4 +646,4 @@ Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_connect.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_connect.phpt diff -u php-src/ext/mysqli/tests/mysqli_connect.phpt:1.1 php-src/ext/mysqli/tests/mysqli_connect.phpt:1.2 --- php-src/ext/mysqli/tests/mysqli_connect.phpt:1.1 Mon Jul 23 12:15:20 2007 +++ php-src/ext/mysqli/tests/mysqli_connect.phpt Wed Oct 10 10:49:00 2007 @@ -135,6 +135,12 @@ mysqli_free_result($res); mysqli_close($link); } + + ini_set('mysqli.default_host', 'p:'); + if (is_object($link = @mysqli_connect())) { + printf("[024] Usage of mysqli.default_host=p: did not fail\n") ; + mysqli_close($link); + } } print "done!"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_fetch_all_oo.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_fetch_all_oo.phpt diff -u php-src/ext/mysqli/tests/mysqli_fetch_all_oo.phpt:1.2 php-src/ext/mysqli/tests/mysqli_fetch_all_oo.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_fetch_all_oo.phpt:1.2 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_fetch_all_oo.phpt Wed Oct 10 10:49:00 2007 @@ -214,12 +214,12 @@ func_mysqli_fetch_all_oo($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400); // don't care about date() strict TZ warnings... - $date = date('Y-m-d'); + $date = @date('Y-m-d'); func_mysqli_fetch_all_oo($link, $engine, "DATE", $date, $date, 410); func_mysqli_fetch_all_oo($link, $engine, "DATE NOT NULL", $date, $date, 420); func_mysqli_fetch_all_oo($link, $engine, "DATE", NULL, NULL, 430); - $datetime = date('Y-m-d H:i:s'); + $datetime = @date('Y-m-d H:i:s'); func_mysqli_fetch_all_oo($link, $engine, "DATETIME", $datetime, $datetime, 440); func_mysqli_fetch_all_oo($link, $engine, "DATETIME NOT NULL", $datetime, $datetime, 450); func_mysqli_fetch_all_oo($link, $engine, "DATETIME", NULL, NULL, 460); http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_fetch_all.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_fetch_all.phpt diff -u php-src/ext/mysqli/tests/mysqli_fetch_all.phpt:1.2 php-src/ext/mysqli/tests/mysqli_fetch_all.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_fetch_all.phpt:1.2 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_fetch_all.phpt Wed Oct 10 10:49:00 2007 @@ -93,67 +93,67 @@ function func_mysqli_fetch_all($link, $engine, $sql_type, $sql_value, $php_value, $offset, $regexp_comparison = NULL) { - if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) { - printf("[%04d] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link)); - return false; - } - - if (!mysqli_query($link, $sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) { - print $sql; - // don't bail, engine might not support the datatype - return false; - } - - if (is_null($php_value) && !mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { - printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); - return false; - } - - if (!is_null($php_value)) { - if (is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { - printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); - return false; - } else if (!is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $sql_value))) { - printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); - return false; - } - } - - if (!$res = mysqli_query($link, "SELECT id, label FROM test")) { - printf("[%04d] [%d] %s\n", $offset + 2, mysqli_errno($link), mysqli_error($link)); - return false; - } - - if (!$tmp = mysqli_fetch_all($res, MYSQLI_BOTH)) { - printf("[%04d] [%d] %s\n", $offset + 3, mysqli_errno($link), mysqli_error($link)); - return false; - } - $row = $tmp[0]; - - $fields = mysqli_fetch_fields($res); - - if (!(gettype($php_value)=="unicode" && ($fields[1]->flags & 128))) { + if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) { + printf("[%04d] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link)); + return false; + } + + if (!mysqli_query($link, $sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) { + print $sql; + // don't bail, engine might not support the datatype + return false; + } + + if (is_null($php_value) && !mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { + printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); + return false; + } + + if (!is_null($php_value)) { + if (is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { + printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); + return false; + } else if (!is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $sql_value))) { + printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); + return false; + } + } - if ($regexp_comparison && !$skip) { - if (!preg_match($regexp_comparison, (string)$row['label']) || !preg_match($regexp_comparison, (string)$row[1])) { - printf("[%04d] Expecting %s/%s [reg exp = %s], got %s/%s resp. %s/%s. [%d] %s\n", $offset + 4, - gettype($php_value), $php_value, $regexp_comparison, - gettype($row[1]), $row[1], - gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link)); - return false; - } - } else { - if (($row['label'] !== $php_value) || ($row[1] != $php_value)) { - printf("[%04d] Expecting %s/%s, got %s/%s resp. %s/%s. [%d] %s\n", $offset + 4, - gettype($php_value), $php_value, - gettype($row[1]), $row[1], - gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link)); - return false; - } + if (!$res = mysqli_query($link, "SELECT id, label FROM test")) { + printf("[%04d] [%d] %s\n", $offset + 2, mysqli_errno($link), mysqli_error($link)); + return false; + } + + if (!$tmp = mysqli_fetch_all($res, MYSQLI_BOTH)) { + printf("[%04d] [%d] %s\n", $offset + 3, mysqli_errno($link), mysqli_error($link)); + return false; + } + $row = $tmp[0]; + + $fields = mysqli_fetch_fields($res); + + if (!(gettype($php_value)=="unicode" && ($fields[1]->flags & 128))) { + + if ($regexp_comparison) { + if (!preg_match($regexp_comparison, (string)$row['label']) || !preg_match($regexp_comparison, (string)$row[1])) { + printf("[%04d] Expecting %s/%s [reg exp = %s], got %s/%s resp. %s/%s. [%d] %s\n", $offset + 4, + gettype($php_value), $php_value, $regexp_comparison, + gettype($row[1]), $row[1], + gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link)); + return false; } - } + } else { + if (($row['label'] !== $php_value) || ($row[1] != $php_value)) { + printf("[%04d] Expecting %s/%s, got %s/%s resp. %s/%s. [%d] %s\n", $offset + 4, + gettype($php_value), $php_value, + gettype($row[1]), $row[1], + gettype($row['label']), $row['label'], mysqli_errno($link), mysqli_error($link)); + return false; + } + } + } - return true; + return true; } function func_mysqli_fetch_array_make_string($len) { @@ -558,4 +558,4 @@ Warning: mysqli_fetch_all(): Mode can be only MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC or MYSQLI_FETCH_BOTH in %s on line %d Warning: mysqli_fetch_array(): Couldn't fetch mysqli_result in %s on line %d -done! \ No newline at end of file +done! http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_fetch_assoc.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_fetch_assoc.phpt diff -u php-src/ext/mysqli/tests/mysqli_fetch_assoc.phpt:1.2 php-src/ext/mysqli/tests/mysqli_fetch_assoc.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_fetch_assoc.phpt:1.2 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_fetch_assoc.phpt Wed Oct 10 10:49:00 2007 @@ -34,7 +34,25 @@ mysqli_free_result($res); - if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d, true AS e")) { + if (!$res = mysqli_query($link, "SELECT + 1 AS a, + 2 AS a, + 3 AS c, + 4 AS C, + NULL AS d, + true AS e, + 5 AS '-1', + 6 AS '-10', + 7 AS '-100', + 8 AS '-1000', + 9 AS '10000', + 'a' AS '100000', + 'b' AS '1000000', + 'c' AS '9', + 'd' AS '9', + 'e' AS '01', + 'f' AS '-02' + ")) { printf("[007] Cannot run query, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); } print "[008]\n"; @@ -60,7 +78,7 @@ [006] NULL [008] -array(5) { +array(15) { ["a"]=> string(1) "2" ["c"]=> @@ -71,6 +89,26 @@ NULL ["e"]=> string(1) "1" + [-1]=> + string(1) "5" + [-10]=> + string(1) "6" + [-100]=> + string(1) "7" + [-1000]=> + string(1) "8" + [10000]=> + string(1) "9" + [100000]=> + string(1) "a" + [1000000]=> + string(1) "b" + [9]=> + string(1) "d" + ["01"]=> + string(1) "e" + ["-02"]=> + string(1) "f" } Warning: mysqli_fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d @@ -86,7 +124,7 @@ [006] NULL [008] -array(5) { +array(15) { [u"a"]=> unicode(1) "2" [u"c"]=> @@ -97,6 +135,26 @@ NULL [u"e"]=> unicode(1) "1" + [-1]=> + unicode(1) "5" + [-10]=> + unicode(1) "6" + [-100]=> + unicode(1) "7" + [-1000]=> + unicode(1) "8" + [10000]=> + unicode(1) "9" + [100000]=> + unicode(1) "a" + [1000000]=> + unicode(1) "b" + [9]=> + unicode(1) "d" + [u"01"]=> + unicode(1) "e" + [u"-02"]=> + unicode(1) "f" } Warning: mysqli_fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_fetch_object.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mysqli/tests/mysqli_fetch_object.phpt diff -u php-src/ext/mysqli/tests/mysqli_fetch_object.phpt:1.2 php-src/ext/mysqli/tests/mysqli_fetch_object.phpt:1.3 --- php-src/ext/mysqli/tests/mysqli_fetch_object.phpt:1.2 Thu Aug 9 10:01:19 2007 +++ php-src/ext/mysqli/tests/mysqli_fetch_object.phpt Wed Oct 10 10:49:00 2007 @@ -96,9 +96,12 @@ I'm using the procedural interface, this should not throw an exception. Also, I did not ask to get exceptions using the mysqli_options() */ - if ($TEST_EXPERIMENTAL) + try { if (false !== ($obj = mysqli_fetch_object($res, 'mysqli_fetch_object_construct', 'a'))) printf("[011] Should have failed\n"); + } catch (Exception $e) { + printf("%s\n", $e->getMessage()); + } mysqli_free_result($res); @@ -145,5 +148,6 @@ Warning: mysqli_fetch_object(): Couldn't fetch mysqli_result in %s on line %d NULL +Parameter ctor_params must be an array Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d \ No newline at end of file
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php