tony2001                Fri Jan 20 11:07:51 2006 UTC

  Modified files:              
    /php-src/ext/oci8/tests     bug36096.phpt 
  Log:
  add new test
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/bug36096.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/oci8/tests/bug36096.phpt
diff -u /dev/null php-src/ext/oci8/tests/bug36096.phpt:1.2
--- /dev/null   Fri Jan 20 11:07:51 2006
+++ php-src/ext/oci8/tests/bug36096.phpt        Fri Jan 20 11:07:51 2006
@@ -0,0 +1,28 @@
+--TEST--
+Bug #36096 (oci_result() returns garbage after oci_fetch() failed)
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+--FILE--
+<?php
+
+require dirname(__FILE__)."/connect.inc";
+
+$sql = "SELECT 'ABC' FROM DUAL WHERE 1<>1";
+$stmt = oci_parse($c, $sql);
+
+if(oci_execute($stmt, OCI_COMMIT_ON_SUCCESS)){
+       var_dump(oci_fetch($stmt));
+       var_dump(oci_result($stmt, 1));
+       var_dump(oci_field_name($stmt, 1));
+       var_dump(oci_field_type($stmt, 1));
+}
+
+echo "Done\n";
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+Done

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

Reply via email to