We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While this query worked fine with version 4.0.2 of sqlsrv
4.0.2
sqlsrv
sqlsrv_query($conn, 'SELECT ?', ['']);
version 4.0.3 will produce a floating point exception for the same query.
4.0.3
Core was generated by `/usr/bin/php7.0 -n -c /vagrant/msphpsql/source/sqlsrv/tmp-php.ini -d output_han'. Program terminated with signal SIGFPE, Arithmetic exception. #0 0x00007f4d923dd0c6 in (anonymous namespace)::default_sql_size_and_scale (param_z=0x7f4d9265cf68, param_z=0x7f4d9265cf68, decimal_digits=<synthetic pointer>, column_size=<synthetic pointer>, encoding=SQLSRV_ENCODING_CHAR, paramno=3, stmt=0x7f4d9266e000) at /vagrant/msphpsql/source/sqlsrv/core_stmt.cpp:1963 1963 column_size = SQL_SERVER_MAX_FIELD_SIZE / char_size;
char_size is defined in line 1957, an will be 0 if Z_STRLEN_P( param_z ) is zero, which happens for an empty string.
char_size
0
Z_STRLEN_P( param_z )
My Environment: Ubuntu 16.04 LTSUbuntu 16.04 LTS PHP 7.0.10-1+deb.sury.org~xenial+1 (cli) ( NTS )PHP 7.0.10-1+deb.sury.org~xenial+1 (cli) ( NTS )
Ubuntu 16.04 LTSUbuntu 16.04 LTS
PHP 7.0.10-1+deb.sury.org~xenial+1 (cli) ( NTS )PHP 7.0.10-1+deb.sury.org~xenial+1 (cli) ( NTS )
This issue is similar to #141 where pdo_sqlsrv is affected.
pdo_sqlsrv
PR is in Progress.
The text was updated successfully, but these errors were encountered:
Same for me.
CentOS Linux release 7.2.1511 (Core) PHP 7.0.10 (cli) (built: Sep 1 2016 10:36:29) ( NTS ) SQLSRV driver 4.0.3.0
Regards
Sorry, something went wrong.
@sirio3mil, @xalopp : We believe we have a fix for this and are validating it in our test labs. Stay tuned :)
@meet-bhagdev could you add some (regression) tests to each fixes, like in PR #145? This will make the fixes more transparent and prevent regressions.
@xalopp Sure thing! Will get it added to our test lab.
4ccffbb fixes this issues 👍
No branches or pull requests
While this query worked fine with version
4.0.2
ofsqlsrv
version
4.0.3
will produce a floating point exception for the same query.char_size
is defined in line 1957, an will be0
ifZ_STRLEN_P( param_z )
is zero, which happens for an empty string.My Environment:
Ubuntu 16.04 LTSUbuntu 16.04 LTS
PHP 7.0.10-1+deb.sury.org~xenial+1 (cli) ( NTS )PHP 7.0.10-1+deb.sury.org~xenial+1 (cli) ( NTS )
This issue is similar to #141 where
pdo_sqlsrv
is affected.PR is in Progress.
The text was updated successfully, but these errors were encountered: