User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries Postgresql MS SQL |
While this is technically a valid fix, at this point I'm seriously more concerned about what has changed either internal to PHP or on the Windows platform (as that seems to be where this issue is happening) that it's becoming mandatory to specify the global namespace prefix in non-namespaced code to load a class that should always exist in the PHP engine.
While this is technically a valid fix, at this point I'm seriously more concerned about what has changed either internal to PHP or on the Windows platform
But why the issue is occuring, only when using SQL server DB ?
Well, someone would need to analyze https://github.com/Microsoft/msphpsql/tree/PHP-7.0 and compare it to the PHP 5 branch to see what the Microsoft team changed to figure out why this issue started.
Nevertheless, the fix passes the unit tests, and also serves as a preparation for introduction of namespaces.
Labels |
Removed:
?
|
I'm not arguing the fix's validity, I just want to understand why we need it as it really seems to imply the Microsoft team introduced a bug into the ext/sqlsrv
code.
Also, the change isn't actually required for namespace support oddly enough. https://github.com/joomla-framework/database/blob/master/src/DatabaseDriver.php#L600 still uses an unprefixed parameter and has been working fine with MySQLi. Can't say much on the Microsoft driver though since we don't have a way to hook up a SQL Server instance in the Travis-CI environment.
The code you can find at https://github.com/Microsoft/msphpsql/blob/master/sqlsrv/stmt.cpp#L722
Can anybody test something like below example?
if (strtolower($class) === 'stdclass')
{
sqlsrv_fetch_object($cursor ? $cursor : $this->cursor);
}
else
{
sqlsrv_fetch_object($cursor ? $cursor : $this->cursor, $class);
}
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-17 12:01:56 |
Closed_By | ⇒ | nibra |
Please double check the code there you use
\\stdClass
and not\stdClass
as per comment