From db0607da1b1bb36079111ee780157af74bf9b669 Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Sun, 3 Dec 2017 19:43:38 +0100 Subject: [PATCH] [BUGFIX] Undefined constant OCI_COMMIT_ON_SUCCESS Test suite on core v7 with PHP 7.2 complains a lot about "Undefined constant OCI_COMMIT_ON_SUCCESS". This is found in the adodb oracle oci8 driver, used as property default value and thus evaluated as soon as the driver class is instantiated in tests. The test suite does not include oci8 in php. The php module sets constant OCI_COMMIT_ON_SUCCESS to hex '0x20' which is 32 in decimal. The patch uses decimal 32 to suppress the warning if oci8 module is not loaded for tests. Change-Id: I218e9758fe8b1bf8a92a8398f6782faa4ed4c9c9 Resolves: #83209 Releases: 7.6 Reviewed-on: https://review.typo3.org/54923 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- typo3/sysext/adodb/adodb/drivers/adodb-oci8.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/adodb/adodb/drivers/adodb-oci8.inc.php b/typo3/sysext/adodb/adodb/drivers/adodb-oci8.inc.php index 2b84b7151ee5..e5742151a6ca 100644 --- a/typo3/sysext/adodb/adodb/drivers/adodb-oci8.inc.php +++ b/typo3/sysext/adodb/adodb/drivers/adodb-oci8.inc.php @@ -62,7 +62,7 @@ class ADODB_oci8 extends ADOConnection { var $sysTimeStamp = 'SYSDATE'; // requires oracle 9 or later, otherwise use SYSDATE var $metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1"; var $_stmt; - var $_commit = OCI_COMMIT_ON_SUCCESS; + var $_commit = 32; // constant 0x20 OCI_COMMIT_ON_SUCCESS; var $_initdate = true; // init date to YYYY-MM-DD var $metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'"; // bin$ tables are recycle bin tables var $metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net -- GitLab