Skip to content

Commit

Permalink
Merge pull request #14 from derflocki/derflocki/li-doctrine-php5-preg…
Browse files Browse the repository at this point in the history
…replace-2

Remove preg_replace /e for PHP5.5: increment bind_index in preg_replace_callback
  • Loading branch information
j0k3r committed Mar 24, 2016
2 parents 5531fc1 + 01faeb3 commit eae2efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/Adapter/Statement/Oracle.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ private function parseQuery($query=null)
}
$bind_index = 1;
// Replace ? bind-placeholders with :oci_b_var_ variables
$query = preg_replace_callback("/(\?)/", function($m) { return ":oci_b_var_". $bind_index++; } , $query);
$query = preg_replace_callback("/(\?)/", function($m) use(&$bind_index) { return ":oci_b_var_". $bind_index++; } , $query);

$this->statement = @oci_parse($this->connection, $query);

Expand Down

0 comments on commit eae2efc

Please sign in to comment.