Bug #78470 [Asn->Csd]: odbc_specialcolumns() no longer accepts $nullable parameter
Edit report at https://bugs.php.net/bug.php?id=78470&edit=1
ID: 78470
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: odbc_specialcolumns() no longer accepts $nullable
parameter
-Status: Assigned
+Status: Closed
Type: Bug
Package: ODBC related
Operating System: *
PHP Version: 7.2Git-2019-08-28 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=610e7d2c77f7af3cc69399e0fdcca0d99300e2ce
Log: Fix #78470: odbc_specialcolumns() no longer accepts $nullable
Previous Comments:
------------------------------------------------------------------------
[2019-08-28 13:04:50] cmb@php.net
Description:
------------
odbc_specialcolumns() is supposed to accept a 7th parameter
$nullable; this is no longer the case as of PHP 7.0.0[1]. Since
this parameter cannot be passed anymore, some arbitrary value will
be used internally, which likely lets the function fail (which
happens to me, see test script), or uses some arbitrary (allowed)
value.
[1] <https://github.com/php/php-src/commit/e8fcd52ef1d2bb215aa40a4b8507a760079e0497#diff-e7dfa5ff1b47832265dcb9426b0af690L3608-R3608>
Test script:
---------------
<?php
$conn = odbc_connect($dsn, $user, $pass);
var_dump(($res = odbc_specialcolumns($conn, SQL_BEST_ROWID, 'TutorialDB', 'dbo',
'TEST', SQL_SCOPE_CURROW)));
var_dump(odbc_fetch_array($res));
Expected result:
----------------
resource(5) of type (odbc result)
array(8) {
["SCOPE"]=>
string(1) "0"
["COLUMN_NAME"]=>
string(2) "id"
["DATA_TYPE"]=>
string(1) "4"
["TYPE_NAME"]=>
string(3) "int"
["COLUMN_SIZE"]=>
string(2) "10"
["BUFFER_LENGTH"]=>
string(1) "4"
["DECIMAL_DIGITS"]=>
string(1) "0"
["PSEUDO_COLUMN"]=>
string(1) "1"
}
Actual result:
--------------
Warning: odbc_specialcolumns(): SQL error: Failed to fetch error message, SQL state HY000 in
SQLSpecialColumns in %s on line %d
bool(false)
Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in %s on line %d
NULL
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78470&edit=1
Thread (2 messages)