summaryrefslogtreecommitdiff
path: root/tests/sql/mysqli_no_constraints.phpt
blob: 1d7fff616d6dc8c1b4b76590745303da633e7e36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Mysqli connection test without any constraints
--INI--
extension=mysqli.so
suhosin.sql.comment=0
suhosin.sql.bailout_on_error=0
suhosin.sql.comment=0
suhosin.sql.opencomment=0
suhosin.sql.multiselect=0
suhosin.sql.union=0
--SKIPIF--
<?php
include('skipifmysqli.inc');
include('skipif.inc');
?>
--FILE--
<?php
include('connect.inc');
$mysqli = connect_mysqli_oostyle();
$result = $mysqli->query("SELECT 1 AS A UNION SELECT 2 -- injection");
$rows = $result->fetch_all();
if ($rows !== null && count($rows) == 2) { echo "ok"; }

?>
--EXPECTF--
ok