1--TEST-- 2PDO PgSQL Bug #72570 (Segmentation fault when binding parameters on a query without placeholders) 3--EXTENSIONS-- 4pdo 5pdo_pgsql 6--SKIPIF-- 7<?php 8require __DIR__ . '/config.inc'; 9require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 10PDOTest::skip(); 11?> 12--FILE-- 13<?php 14require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 15$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); 16$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 17 18$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); 19 20$stmt = $db->prepare("SELECT 1"); 21 22try { 23 var_dump($stmt->execute([1])); 24} catch (PDOException $e) { 25 var_dump($e->getCode()); 26} 27 28?> 29--EXPECT-- 30string(5) "08P01" 31