#35675 [Opn]: pg_execute changes the type of passed parameters

From: Date: Thu, 15 Dec 2005 06:19:50 +0000
Subject: #35675 [Opn]: pg_execute changes the type of passed parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90450@lists.php.net to get a copy of this message
ID: 35675 User updated by: david at tulloh dot id dot au Reported By: david at tulloh dot id dot au Status: Open Bug Type: PostgreSQL related Operating System: Debian Linux PHP Version: 5.1.1 New Comment: work around until it's fixed and for older versions: $type = gettype($i); @pg_execute('dummy_entry', array($i) ); settype($i, $type); Previous Comments: ------------------------------------------------------------------------ [2005-12-15 02:14:11] david at tulloh dot id dot au Description: ------------ pg_execute will change the type of a passed parameter into a string. Reproduce code: --------------- <?php $i = 42; var_dump($i); pg_pconnect("insert connect details here"); @pg_execute('dummy_entry', array($i) ); var_dump($i); ?> Expected result: ---------------- int(42) int(42) Actual result: -------------- int(42) string(2) "42" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35675&edit=1

« previous php.bugs (#90450) next »