|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78470 odbc_specialcolumns() no longer accepts $nullable parameter
Submitted: 2019-08-28 13:04 UTC Modified: 2020-09-23 18:00 UTC
From: Assigned: cmb (profile)
Status: Closed Package: ODBC related
PHP Version: 7.2Git-2019-08-28 (Git) OS: *
Private report: No CVE-ID: None
 [2019-08-28 13:04 UTC]
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)

[1] <>

Test script:

$conn = odbc_connect($dsn, $user, $pass);
var_dump(($res = odbc_specialcolumns($conn, SQL_BEST_ROWID, 'TutorialDB', 'dbo', 'TEST', SQL_SCOPE_CURROW)));

Expected result:
resource(5) of type (odbc result)
array(8) {
  string(1) "0"
  string(2) "id"
  string(1) "4"
  string(3) "int"
  string(2) "10"
  string(1) "4"
  string(1) "0"
  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

Warning: odbc_fetch_array() expects parameter 1 to be resource, boolean given in %s on line %d


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-23 18:00 UTC]
-Assigned To: +Assigned To: cmb
 [2020-09-24 10:24 UTC]
Automatic comment on behalf of
Log: Fix #78470: odbc_specialcolumns() no longer accepts $nullable
 [2020-09-24 10:24 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 11:01:34 2024 UTC