Bug #78470 [NEW]: odbc_specialcolumns() no longer accepts $nullable parameter
From: cmb
Operating system: *
PHP version: 7.2Git-2019-08-28 (Git)
Package: ODBC related
Bug Type: Bug
Bug description:odbc_specialcolumns() no longer accepts $nullable parameter
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 bug report at https://bugs.php.net/bug.php?id=78470&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78470&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78470&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78470&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78470&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78470&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78470&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78470&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78470&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78470&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78470&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78470&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78470&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78470&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78470&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78470&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78470&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78470&r=mysqlcfg
Thread (2 messages)
- cmb@php.net