diff options
Diffstat (limited to 'ext/oci8/tests/bug27303_2.phpt')
-rw-r--r-- | ext/oci8/tests/bug27303_2.phpt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index 1fb2b31682..72d4e5a7dd 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -5,12 +5,15 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. -if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 && - preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases"); - // Other point releases may also work +preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); +if (!(isset($matches[0]) && + (($matches[1] == 10 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2) || + ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2) + ))) { + die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases"); } -if (preg_match('/^11\./', oci_client_version()) != 1) { +preg_match('/^[[:digit:]]+/', oci_client_version(), $matches); +if (isset($matches[0]) && $matches[0] < 11) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> |