--TEST-- Bug #81037 PDO discards error message text from prepared statement --SKIPIF-- --FILE-- setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); MySQLPDOTest::createTestTable($pdo); $sql = "SELECT id FROM test WHERE label = :par"; $stmt = $pdo->prepare($sql); try { $stmt->execute(); } catch (PDOException $e) { echo $e->getMessage(), "\n"; } $data = $stmt->fetchAll(PDO::FETCH_ASSOC); ?> --CLEAN-- --EXPECT-- SQLSTATE[HY000]: General error: 2031 No data supplied for parameters in prepared statement