Skip to content
Snippets Groups Projects
Commit 21b46745 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Gestion des NULL pour les CLOB et BLOB

On ignore certains messages deprecated qu'on ne peut pas contourner
parent 0d53f89e
No related branches found
No related tags found
No related merge requests found
Pipeline #25071 passed
......@@ -106,24 +106,19 @@ class Driver implements DriverInterface
foreach ($params as $key => $val) {
$type = isset($types[$key]) ? $types[$key] : null;
switch ($type) {
case Bdd::TYPE_CLOB:
$dkey = oci_new_descriptor($this->connexion, OCI_D_LOB);
if (Bdd::TYPE_CLOB === $type && !empty($val)) {
$dkey = @oci_new_descriptor($this->connexion, OCI_D_LOB);
$dkey->writeTemporary($params[$key], OCI_TEMP_CLOB);
//${$key} = oci_new_descriptor($this->connexion, OCI_D_LOB);
//${$key}->writeTemporary($params[$key], OCI_TEMP_CLOB);
${$key} = $dkey;
oci_bind_by_name($statement, ':' . $key, ${$key}, -1, OCI_B_CLOB);
break;
case Bdd::TYPE_BLOB:
${$key} = oci_new_descriptor($this->connexion, OCI_D_LOB);
} elseif (Bdd::TYPE_BLOB === $type && !empty($val)) {
${$key} = @oci_new_descriptor($this->connexion, OCI_D_LOB);
${$key}->writeTemporary($params[$key], OCI_TEMP_BLOB);
oci_bind_by_name($statement, ':' . $key, ${$key}, -1, OCI_B_BLOB);
break;
default:
} else {
${$key} = $val;
oci_bind_by_name($statement, ':' . $key, ${$key});
break;
}
}
if (false === @oci_execute($statement, $this->commitMode)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment