diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-21 15:31:15 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-21 15:32:32 +0100 |
commit | 737195c3ae6ac53b9501cfc39cc80fd462909c82 (patch) | |
tree | 1fe2b2c88153359d9cb4ffcedf72e0a6f304e688 /ext/pdo_pgsql | |
parent | 5a3c1f61d41af678c70a86de3f44126ae5710c8e (diff) | |
download | php-git-737195c3ae6ac53b9501cfc39cc80fd462909c82.tar.gz |
PDO: Honor ATTR_STRINGIFY_FETCHES for booleans
Of the important PDO drivers, this affects only PDO PgSQL, as
both MySQL and SQLite do not return native boolean types.
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r-- | ext/pdo_pgsql/tests/bug62593.phpt | 1 | ||||
-rw-r--r-- | ext/pdo_pgsql/tests/bug71885.phpt | 4 | ||||
-rw-r--r-- | ext/pdo_pgsql/tests/bug71885_2.phpt | 8 | ||||
-rw-r--r-- | ext/pdo_pgsql/tests/bug75402.phpt | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/ext/pdo_pgsql/tests/bug62593.phpt b/ext/pdo_pgsql/tests/bug62593.phpt index 598307a652..a50bcdbc25 100644 --- a/ext/pdo_pgsql/tests/bug62593.phpt +++ b/ext/pdo_pgsql/tests/bug62593.phpt @@ -13,6 +13,7 @@ require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); +$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); $errors = array(); $value = true; diff --git a/ext/pdo_pgsql/tests/bug71885.phpt b/ext/pdo_pgsql/tests/bug71885.phpt index f47ffcb444..a0a72b6796 100644 --- a/ext/pdo_pgsql/tests/bug71885.phpt +++ b/ext/pdo_pgsql/tests/bug71885.phpt @@ -37,10 +37,10 @@ foreach ([false, true] as $emulate) { string(3) "ERR" array(1) { [0]=> - bool(true) + string(1) "1" } array(1) { [0]=> - bool(true) + string(1) "1" } ==OK== diff --git a/ext/pdo_pgsql/tests/bug71885_2.phpt b/ext/pdo_pgsql/tests/bug71885_2.phpt index 2f9b9923b0..334899db48 100644 --- a/ext/pdo_pgsql/tests/bug71885_2.phpt +++ b/ext/pdo_pgsql/tests/bug71885_2.phpt @@ -40,18 +40,18 @@ foreach ([false, true] as $emulate) { --EXPECT-- array(1) { [0]=> - bool(false) + string(1) "0" } array(1) { [0]=> - bool(true) + string(1) "1" } array(1) { [0]=> - bool(false) + string(1) "0" } array(1) { [0]=> - bool(true) + string(1) "1" } ==OK== diff --git a/ext/pdo_pgsql/tests/bug75402.phpt b/ext/pdo_pgsql/tests/bug75402.phpt index 3aa26660ef..5db01b16b5 100644 --- a/ext/pdo_pgsql/tests/bug75402.phpt +++ b/ext/pdo_pgsql/tests/bug75402.phpt @@ -105,7 +105,7 @@ object(stdClass)#2 (1) { ["sprogress"]=> string(3) "100" ["bhidden"]=> - bool(false) + string(1) "0" ["sdatetime"]=> string(19) "2017.10.16 08:36:45" } |