Remove warning

This commit is contained in:
Laurent Destailleur 2020-11-07 12:06:14 +01:00
parent ea4ad24ac5
commit 2da6fc1ef0
2 changed files with 8 additions and 5 deletions

View File

@ -3,9 +3,9 @@
## ENABLE MODULE ZAPIER ON DOLIBARR
This should also enable the module API (required for authentication by Zapier service).
This should also enable the module API (required for authentication by Zapier service and to execute action in Dolibarr by Zapier).
Create the Dolibarr login that will be used by Zapier to call APIs.
Create the Dolibarr login that will be used by Zapier to call APIs. Give the login the permissions on the action you plan to automate.
## CREATE A ZAPIER DEVELOPPER ACCOUNT

View File

@ -7538,9 +7538,12 @@ abstract class CommonObject
if ($field == 'entity' && is_null($this->{$field})) $queryarray[$field] = $conf->entity;
else {
// $this->{$field} may be null, '', 0, '0', 123, '123'
if ($this->{$field} != '' || !empty($info['notnull'])) {
if ($this->isInt($info)) $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
if ($this->isFloat($info)) $queryarray[$field] = (double) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) {
if ($this->isInt($info)) {
$queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
} elseif ($this->isFloat($info)) {
$queryarray[$field] = (double) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
}
} else $queryarray[$field] = null;
}
} else {