|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-02-16 07:48 UTC] menschov dot evgeny at yandex dot ru
Description: ------------ I brought up php 8.0.2 in docker, using pdo odbc drivers to connect to database. In php 7.4, PDO::quote returned false, in 8.0.2 it started throwing an exception, which breaks backward compatibility. I attach a screenshot of the problem https://monosnap.com/file/3X2hncrAbPLQ9FFNNbP4usbCcXCdG2 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Code Example: <?php $dsn = 'odbc:WEB-TRUNK'; $user = ''; $password = ''; print '<pre>'; var_dump('error_reporting: ' . ini_get('error_reporting')); var_dump('display_startup_errors: ' . ini_get('display_startup_errors')); var_dump('PDO::ATTR_ERRMODE: PDO::ERRMODE_SILENT'); print '</pre>'; try { $dbh = new PDO($dsn, $user, $password); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); echo $dbh->quote("test"); } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } phpinfo();