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