Bug #70822 [Com]: oci_bind_by_name doesn't work with variables in arrays

From: Date: Sat, 31 Oct 2015 08:37:16 +0000
Subject: Bug #70822 [Com]: oci_bind_by_name doesn't work with variables in arrays
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196940@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70822&edit=1 ID: 70822 Comment by: wingman at ip-home dot net Reported by: wingman at ip-home dot net Summary: oci_bind_by_name doesn't work with variables in arrays Status: Open Type: Bug Package: Oracle related Operating System: Gentoo Linux PHP Version: 7.0.0RC6 Block user comment: N Private report: N New Comment: Some workaround: ---- dont works: ---- $args = [ [$p1, $v1], [$p2, $v2] ]; foreach( $args as $a ) { oci_bind_by_name($sth, $a[0], $a[1], -1); } ---- works: ---- foreach( $args as $a ) { $temp1 = &$a[0]; $temp2 = &$a[1]; oci_bind_by_name($sth, $a[0], $a[1], -1); } Previous Comments: ------------------------------------------------------------------------ [2015-10-30 13:02:57] wingman at ip-home dot net Description: ------------ php7 + occi does not bind variables by name when variables are in array. Same script with php5.6 works well Test script: --------------- Test script with error: http://pastebin.com/ggdRKF3m Result is empty, because variables are not bound :( This code works well with php5.6 ------------------- Same script, but variables are bound directly, without array/foreach: http://pastebin.com/7NTmN9DB oci returns result from DB ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70822&edit=1

« previous php.bugs (#196940) next »