[BUGFIX] Undefined constant ADODB_ASSOC_CASE 24/54924/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Dec 2017 19:21:18 +0000 (20:21 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Dec 2017 19:30:19 +0000 (20:30 +0100)
adodb (v7 only) expects constant ADODB_ASSOC_CASE to be
set. PHP 7.2 now throws warnings if constants are not
defined.
Patch defines ADODB_ASSOC_CASE in unit test setUp() if
it not has been defined before.

Change-Id: Ie338c3e871ae0eb2f8536515c65b556381bf65c3
Resolves: #83210
Releases: 7.6
Reviewed-on: https://review.typo3.org/54924
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/dbal/Tests/Unit/Database/DatabaseConnectionPostgresqlTest.php

index b17b08b..fc87af0 100644 (file)
@@ -31,6 +31,9 @@ class DatabaseConnectionPostgresqlTest extends AbstractTestCase
      */
     protected function setUp()
     {
+        if (!defined('ADODB_ASSOC_CASE')) {
+            define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE);
+        }
         $configuration = [
             'handlerCfg' => [
                 '_DEFAULT' => [