From 546b3dd4d5d060ef490872890d7322884db96455 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 20 Feb 2022 05:17:06 +0100 Subject: [PATCH] Fix travis --- htdocs/asset/class/assetdepreciationoptions.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/asset/class/assetdepreciationoptions.class.php b/htdocs/asset/class/assetdepreciationoptions.class.php index 79395111ba7..ce2ddd73c08 100644 --- a/htdocs/asset/class/assetdepreciationoptions.class.php +++ b/htdocs/asset/class/assetdepreciationoptions.class.php @@ -309,7 +309,7 @@ class AssetDepreciationOptions extends CommonObject public function fetchDeprecationOptions($asset_id = 0, $asset_model_id = 0) { global $langs, $hookmanager; - dol_syslog(__METHOD__ . " sset_id=$asset_id, asset_model_id=$asset_model_id"); + dol_syslog(__METHOD__ . " asset_id=$asset_id, asset_model_id=$asset_model_id"); $error = 0; $this->errors = array(); @@ -346,7 +346,7 @@ class AssetDepreciationOptions extends CommonObject foreach ($this->deprecation_options_fields as $mode_key => $mode_info) { $this->setInfosForMode($mode_key, $class_type); - $result = $this->fetchCommon(0, '', " AND " . ($asset_id > 0 ? " fk_asset = " . $asset_id : " fk_asset_model = " . $asset_model_id)); + $result = $this->fetchCommon(0, '', " AND " . ($asset_id > 0 ? " fk_asset = " . (int) $asset_id : " fk_asset_model = " . (int) $asset_model_id)); if ($result < 0) { $this->errors = array_merge(array($langs->trans('AssetErrorFetchDepreciationOptionsForMode', $mode_key) . ':'), $this->errors); $error++;