mirror of
https://github.com/php/php-src.git
synced 2026-04-21 23:18:13 +02:00
ce1d69a1f6
PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
46 lines
951 B
PHP
46 lines
951 B
PHP
--TEST--
|
|
odbc_exec(): Basic test
|
|
--SKIPIF--
|
|
<?php include 'skipif.inc'; ?>
|
|
<?php
|
|
if ("unixODBC" != ODBC_TYPE) {
|
|
die("skip ODBC_TYPE != unixODBC");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
include 'config.inc';
|
|
|
|
$conn = odbc_connect($dsn, $user, $pass);
|
|
|
|
odbc_exec($conn, 'foo', 'bar');
|
|
odbc_exec($conn, 'foo');
|
|
|
|
odbc_exec($conn, '', '');
|
|
odbc_exec($conn, '');
|
|
|
|
odbc_exec($conn, 1, 1);
|
|
odbc_exec($conn, 1);
|
|
|
|
odbc_exec($conn, NULL, NULL);
|
|
odbc_exec($conn, NULL);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: odbc_exec() expects parameter 3 to be int, string given in %s on line %d
|
|
|
|
Warning: odbc_exec(): SQL error: %s in %s on line %d
|
|
|
|
Warning: odbc_exec() expects parameter 3 to be int, string given in %s on line %d
|
|
|
|
Warning: odbc_exec(): SQL error: %s in %s on line %d
|
|
|
|
Warning: odbc_exec(): SQL error: %s in %s on line %d
|
|
|
|
Warning: odbc_exec(): SQL error: %s in %s on line %d
|
|
|
|
Warning: odbc_exec(): SQL error: %s in %s on line %d
|
|
|
|
Warning: odbc_exec(): SQL error: %s in %s on line %d
|