]> git.nbdom.net Git - nb.git/commitdiff
bindParam maxLength not null
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 11 Oct 2024 09:08:10 +0000 (11:08 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 11 Oct 2024 09:08:10 +0000 (11:08 +0200)
lib/php/db/field.php

index 139403fe9a0426959f85bb3e0c0984edfde9af6c..bbd701b79f6c0c3aba3f6fa3d29ade75f45c9905 100644 (file)
@@ -387,7 +387,10 @@ return false;
       $value = strval($value);
       return $sth->bindParam($name, $value, PDO::PARAM_STR);
     }
-    return $sth->bindParam($name, $value, $this->type2pdo($this->type), $this->size());
+    $size = $this->size();
+    # Passing null to parameter #4 ($maxLength) of type int is deprecatedassing null to parameter #4 ($maxLength) of type int is deprecated
+    if ($size === null) $size = 0;
+    return $sth->bindParam($name, $value, $this->type2pdo($this->type), $size);
 // NB 27.07.15     return $sth->bindParam($name, $value, $this->type2pdo($value));
   }