tony2001 Thu May 18 13:21:08 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/oci8 oci8.c
/php-src/ext/oci8/tests fetch_array.phpt field_funcs1.phpt
field_funcs.phpt lob_011.phpt
select_null.phpt
Log:
MFH: fix #37487 (oci_fetch_array() array-type should always default to
OCI_BOTH)
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.31&r2=1.2027.2.547.2.32&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.31 php-src/NEWS:1.2027.2.547.2.32
--- php-src/NEWS:1.2027.2.547.2.31 Wed May 17 16:37:01 2006
+++ php-src/NEWS Thu May 18 13:21:07 2006
@@ -38,6 +38,8 @@
- Added pg_field_table() function. (Edin)
- Added implementation of curl_multi_info_read(). (Brian)
- Added RFC2397 (data: stream) support. (Marcus)
+- Fixed bug #37487 (oci_fetch_array() array-type should always default to
+ OCI_BOTH). (Tony)
- Fixed bug #37395 (recursive mkdir() fails to create nonexistent directories
in root dir). (Tony)
- Fixed bug #37457 (Crash when an exception is thrown in accept() method of
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.16.2.1&r2=1.269.2.16.2.2&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.16.2.1
php-src/ext/oci8/oci8.c:1.269.2.16.2.2
--- php-src/ext/oci8/oci8.c:1.269.2.16.2.1 Wed May 10 10:07:28 2006
+++ php-src/ext/oci8/oci8.c Thu May 18 13:21:07 2006
@@ -26,7 +26,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.269.2.16.2.1 2006/05/10 10:07:28 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.269.2.16.2.2 2006/05/18 13:21:07 tony2001 Exp $ */
/* TODO
*
* file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty()
with OCI_ATTR_LOBEMPTY
@@ -647,7 +647,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.1 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.2 $");
sprintf(buf, "%ld", OCI_G(num_persistent));
php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -1643,6 +1643,16 @@
fetch_mode = mode;
}
+ if (!(fetch_mode & PHP_OCI_NUM) && !(fetch_mode & PHP_OCI_ASSOC)) {
+ /* none of the modes present, use the default one */
+ if (mode & PHP_OCI_ASSOC) {
+ fetch_mode |= PHP_OCI_ASSOC;
+ }
+ if (mode & PHP_OCI_NUM) {
+ fetch_mode |= PHP_OCI_NUM;
+ }
+ }
+
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
if (php_oci_statement_fetch(statement, nrows TSRMLS_CC)) {
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/fetch_array.phpt?r1=1.1.2.4&r2=1.1.2.4.2.1&diff_format=u
Index: php-src/ext/oci8/tests/fetch_array.phpt
diff -u php-src/ext/oci8/tests/fetch_array.phpt:1.1.2.4
php-src/ext/oci8/tests/fetch_array.phpt:1.1.2.4.2.1
--- php-src/ext/oci8/tests/fetch_array.phpt:1.1.2.4 Tue Mar 28 09:12:45 2006
+++ php-src/ext/oci8/tests/fetch_array.phpt Thu May 18 13:21:08 2006
@@ -209,58 +209,100 @@
["VALUE"]=>
string(1) "1"
}
-array(2) {
+array(4) {
[0]=>
string(1) "1"
+ ["ID"]=>
+ string(1) "1"
[1]=>
string(1) "1"
+ ["VALUE"]=>
+ string(1) "1"
}
-array(2) {
+array(4) {
[0]=>
string(1) "1"
+ ["ID"]=>
+ string(1) "1"
[1]=>
string(1) "1"
+ ["VALUE"]=>
+ string(1) "1"
}
-array(2) {
+array(4) {
[0]=>
string(1) "1"
+ ["ID"]=>
+ string(1) "1"
[1]=>
string(1) "1"
+ ["VALUE"]=>
+ string(1) "1"
}
-array(5) {
+array(10) {
[0]=>
string(1) "1"
+ ["ID"]=>
+ string(1) "1"
[1]=>
string(1) "1"
+ ["VALUE"]=>
+ string(1) "1"
[2]=>
NULL
+ ["BLOB"]=>
+ NULL
[3]=>
NULL
+ ["CLOB"]=>
+ NULL
[4]=>
NULL
+ ["STRING"]=>
+ NULL
}
-array(5) {
+array(10) {
[0]=>
string(1) "1"
+ ["ID"]=>
+ string(1) "1"
[1]=>
string(1) "1"
+ ["VALUE"]=>
+ string(1) "1"
[2]=>
NULL
+ ["BLOB"]=>
+ NULL
[3]=>
NULL
+ ["CLOB"]=>
+ NULL
[4]=>
NULL
+ ["STRING"]=>
+ NULL
}
-array(5) {
+array(10) {
[0]=>
string(1) "1"
+ ["ID"]=>
+ string(1) "1"
[1]=>
string(1) "1"
+ ["VALUE"]=>
+ string(1) "1"
[2]=>
NULL
+ ["BLOB"]=>
+ NULL
[3]=>
NULL
+ ["CLOB"]=>
+ NULL
[4]=>
NULL
+ ["STRING"]=>
+ NULL
}
Done
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/field_funcs1.phpt?r1=1.1.2.1&r2=1.1.2.1.2.1&diff_format=u
Index: php-src/ext/oci8/tests/field_funcs1.phpt
diff -u php-src/ext/oci8/tests/field_funcs1.phpt:1.1.2.1
php-src/ext/oci8/tests/field_funcs1.phpt:1.1.2.1.2.1
--- php-src/ext/oci8/tests/field_funcs1.phpt:1.1.2.1 Thu Dec 8 22:30:23 2005
+++ php-src/ext/oci8/tests/field_funcs1.phpt Thu May 18 13:21:08 2006
@@ -34,7 +34,7 @@
die("oci_execute(select) failed!\n");
}
-$row = oci_fetch_array($s, OCI_RETURN_NULLS + OCI_RETURN_LOBS);
+$row = oci_fetch_array($s, OCI_NUM + OCI_RETURN_NULLS + OCI_RETURN_LOBS);
var_dump($row);
var_dump(oci_field_is_null($s, -1));
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/field_funcs.phpt?r1=1.1.2.4&r2=1.1.2.4.2.1&diff_format=u
Index: php-src/ext/oci8/tests/field_funcs.phpt
diff -u php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4
php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4.2.1
--- php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4 Tue Mar 28 09:12:45 2006
+++ php-src/ext/oci8/tests/field_funcs.phpt Thu May 18 13:21:08 2006
@@ -34,7 +34,7 @@
die("oci_execute(select) failed!\n");
}
-$row = oci_fetch_array($s, OCI_RETURN_NULLS + OCI_RETURN_LOBS);
+$row = oci_fetch_array($s, OCI_NUM + OCI_RETURN_NULLS + OCI_RETURN_LOBS);
var_dump($row);
foreach ($row as $num => $field) {
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/lob_011.phpt?r1=1.1.2.3&r2=1.1.2.3.2.1&diff_format=u
Index: php-src/ext/oci8/tests/lob_011.phpt
diff -u php-src/ext/oci8/tests/lob_011.phpt:1.1.2.3
php-src/ext/oci8/tests/lob_011.phpt:1.1.2.3.2.1
--- php-src/ext/oci8/tests/lob_011.phpt:1.1.2.3 Tue Dec 6 19:28:25 2005
+++ php-src/ext/oci8/tests/lob_011.phpt Thu May 18 13:21:08 2006
@@ -69,8 +69,10 @@
int(32)
bool(true)
string(32) "some string here. string, I said"
-array(1) {
+array(2) {
[0]=>
string(32) "some string here. string, I said"
+ ["BLOB"]=>
+ string(32) "some string here. string, I said"
}
Done
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/select_null.phpt?r1=1.1.2.1&r2=1.1.2.1.2.1&diff_format=u
Index: php-src/ext/oci8/tests/select_null.phpt
diff -u php-src/ext/oci8/tests/select_null.phpt:1.1.2.1
php-src/ext/oci8/tests/select_null.phpt:1.1.2.1.2.1
--- php-src/ext/oci8/tests/select_null.phpt:1.1.2.1 Thu Dec 8 22:30:23 2005
+++ php-src/ext/oci8/tests/select_null.phpt Thu May 18 13:21:08 2006
@@ -16,8 +16,10 @@
echo "Done\n";
?>
--EXPECT--
-array(1) {
+array(2) {
[0]=>
NULL
+ ["NULL"]=>
+ NULL
}
Done
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php