You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible fix: This should throw an Exception not a hard crash on SEGMENTATION FAULT
When parameter is an array with string keys,
the driver crashes hard with a segmentation fault.
php 7.4 driver 5.10 but this seems NOT fixed in later recent drivers (not tested).
$params = [ 442502 ];
// bool true$params = [ array(442502) ];
// bool true$params = [ array('id' => 442502) ];
// SQLerror: Parameter array 1 must have at least one value or variable$params = [ array('id' => 442502, 'foo' => 'bar') ];
// SEGMENTATION FAULT: 11 !!!!!$res = sqlsrv_query($conn, "SELECT id FROM product WHERE id = ?", $params);
if (sqlsrv_errors()) var_dump(sqlsrv_errors());
var_dump(sqlsrv_has_rows($res));
The text was updated successfully, but these errors were encountered:
GDmac
changed the title
SEGMENTATION FAULT when (accidentally) using array with keys
SEGMENTATION FAULT when using array with keys
Jul 27, 2023
Possible fix: This should throw an Exception not a hard crash on SEGMENTATION FAULT
When parameter is an array with string keys,
the driver crashes hard with a segmentation fault.
php 7.4 driver 5.10 but this seems NOT fixed in later recent drivers (not tested).
The text was updated successfully, but these errors were encountered: