Annotation of embedaddon/php/ext/oci8/tests/bug36096.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #36096 (oci_result() returns garbage after oci_fetch() failed)
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: require dirname(__FILE__)."/connect.inc";
! 9:
! 10: $sql = "SELECT 'ABC' FROM DUAL WHERE 1<>1";
! 11: $stmt = oci_parse($c, $sql);
! 12:
! 13: if(oci_execute($stmt, OCI_COMMIT_ON_SUCCESS)){
! 14: var_dump(oci_fetch($stmt));
! 15: var_dump(oci_result($stmt, 1));
! 16: var_dump(oci_field_name($stmt, 1));
! 17: var_dump(oci_field_type($stmt, 1));
! 18: }
! 19:
! 20: echo "Done\n";
! 21:
! 22: ?>
! 23: --EXPECTF--
! 24: bool(false)
! 25: bool(false)
! 26: string(%r[53]%r) "%r('ABC'|EXP)%r"
! 27: string(4) "CHAR"
! 28: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>