From: danielc at analysisandsolutions dot com Operating system: Windows 2000 PHP version: 4.3.4 PHP Bug Type: MSSQL related Bug description: divide by zero errors not reported
Description: ------------ MSSQL seems to not like queries that divide by zero -- see the OSQL commands below. But, PHP doesn't report it as an error. osql -Usa 1> SELECT 0/0 AS FOO 2> go Msg 8134, Level 16, State 1, Server BASE2K, Line 1 Divide by zero error encountered. Reproduce code: --------------- $c = mssql_connect('localhost', 'sa', 'pw'); $result = @mssql_query('SELECT 0/0 AS FOO', $c); if ($result) { $ar = mssql_fetch_array($result, MSSQL_ASSOC); var_dump($ar); } else { echo mssql_get_last_message(); } Expected result: ---------------- Divide by zero error encountered. Actual result: -------------- array(1) { ["foo"]=> NULL } -- Edit bug report at http://bugs.php.net/?id=26799&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26799&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26799&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26799&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26799&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26799&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26799&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26799&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26799&r=support Expected behavior: http://bugs.php.net/fix.php?id=26799&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26799&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26799&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26799&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26799&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26799&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26799&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26799&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26799&r=float