1--TEST--
2Bug ##76452 (Crash while parsing blob data in firebird_fetch_blob)
3--EXTENSIONS--
4pdo_firebird
5--SKIPIF--
6<?php require('skipif.inc'); ?>
7--FILE--
8<?php
9require_once "payload_server.inc";
10
11$address = run_server(__DIR__ . "/bug_76452.data");
12
13// no need to change the credentials; we're running against a falke server
14$dsn = "firebird:dbname=inet://$address/test";
15$username = 'SYSDBA';
16$password = 'masterkey';
17
18$dbh = new PDO($dsn, $username, $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
19$query = $dbh->prepare("select * from test");
20$query->execute();
21var_dump($query->fetch());
22?>
23--EXPECT--
24array(4) {
25  ["AAA"]=>
26  string(4) "hihi"
27  [0]=>
28  string(4) "hihi"
29  ["BBBB"]=>
30  NULL
31  [1]=>
32  NULL
33}
34