--TEST-- PDO Common: Bug #72368 (PdoStatement->execute() fails but does not throw an exception) --SKIPIF-- --FILE-- setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $params = [":bar" => 1]; $sql = "SELECT 1"; $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); try { $stmt = $db->prepare($sql); var_dump($stmt->execute($params)); } catch (PDOException $e) { var_dump('ERR'); } $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); try { $stmt = $db->prepare($sql); var_dump($stmt->execute($params)); } catch (PDOException $e) { var_dump('ERR'); } ?> ===DONE=== --EXPECT-- string(3) "ERR" string(3) "ERR" ===DONE===