Skip to content

Commit ac6c976

Browse files
committed
no symmetry pre-8.2 on string functions it seems
1 parent 326ee71 commit ac6c976

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ibm_db2.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6230,7 +6230,16 @@ static void _php_db2_bind_fetch_helper(INTERNAL_FUNCTION_PARAMETERS, int op)
62306230
stmt_res->column_info[i].name = (SQLCHAR *)zend_str_tolower_dup((char *)stmt_res->column_info[i].name, strlen((char *)stmt_res->column_info[i].name));
62316231
break;
62326232
case DB2_CASE_UPPER:
6233+
#if PHP_VERSION_ID >= 80200
6234+
/*
6235+
* For some reason, zend_str_tolower_dup has existed for a
6236+
* while, but the upper version hasn't. We seems to need an
6237+
* ifdef here unfortunately.
6238+
*/
62336239
stmt_res->column_info[i].name = (SQLCHAR *)zend_str_toupper_dup((char *)stmt_res->column_info[i].name, strlen((char *)stmt_res->column_info[i].name));
6240+
#else
6241+
stmt_res->column_info[i].name = (SQLCHAR *)php_strtoupper((char *)stmt_res->column_info[i].name, strlen((char *)stmt_res->column_info[i].name));
6242+
#endif
62346243
break;
62356244
case DB2_CASE_NATURAL:
62366245
default:

0 commit comments

Comments
 (0)