pecl_bug6109.phpt 629 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --TEST--
  2. PECL Bug #6109 (Error messages not kept)
  3. --SKIPIF--
  4. <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
  5. --FILE--
  6. <?php
  7. require(dirname(__FILE__).'/connect.inc');
  8. // Run Test
  9. echo "Test 1\n";
  10. $s = oci_parse($c, 'delete from table_does_not_exist');
  11. $r = @oci_execute($s);
  12. if ($r) {
  13. echo "whoops - table does exist\n";
  14. } else {
  15. for ($i = 0; $i < 5; $i++) {
  16. $err = oci_error($s);
  17. echo ($i) .' -> '.$err['message'] ."\n";
  18. }
  19. }
  20. // Cleanup
  21. oci_close($c);
  22. echo "Done\n";
  23. ?>
  24. --EXPECTF--
  25. Test 1
  26. 0 -> ORA-00942: %s
  27. 1 -> ORA-00942: %s
  28. 2 -> ORA-00942: %s
  29. 3 -> ORA-00942: %s
  30. 4 -> ORA-00942: %s
  31. Done