fix bug #73055
[m6w6/ext-http] / tests / gh-issue7.phpt
1 --TEST--
2 crash with querystring and exception from error handler
3 --SKIPIF--
4 <?php include "skipif.inc"; ?>
5 --GET--
6 q[]=1&r[]=2
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 set_error_handler(function($c,$e) { throw new Exception($e); });
12
13 try {
14 $q = http\QueryString::getGlobalInstance();
15 var_dump($q->get("q","s"));
16 } catch (\Exception $e) {
17 echo $e->getMessage(),"\n";
18 }
19 try {
20 $r = new http\Env\Request;
21 var_dump($r->getQuery("r", "s"));
22 } catch (\Exception $e) {
23 echo $e->getMessage(),"\n";
24 }
25
26 ?>
27 ===DONE===
28 --EXPECT--
29 Test
30 Array to string conversion
31 Array to string conversion
32 ===DONE===