|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-10-30 13:02 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
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); }fixed by: - foreach( $args as $a ) { + foreach( $args as &$a ) {